【问题标题】:Git and GitHub CLI clone or push not workingGit 和 GitHub CLI 克隆或推送不起作用
【发布时间】:2022-09-29 19:11:18
【问题描述】:
Cloning into \'-\'...
fatal: unable to access \'https://github.com/NazmusSayad/-.git/\': OpenSSL SSL_connect: Connection was reset in connection to github.com:443
exit status 128

如果我推送或克隆任何东西,这是行不通的。这显示了这个错误。 但是,如果我使用gh auth login 重新登录 git,那么它可以正常工作,但是在重新打开 shell 后再次无法正常工作。

注意:Git 和 GitHub CLI 版本是最新的。

  • 您是否使用 Windows 默认设置以外的防病毒、防火墙或代理?
  • 不...但是在启用我的路由器 UPNP 后,它运行良好。然后我尝试禁用 UPNP 但仍在工作

标签: git github openssl github-for-windows


【解决方案1】:

我遇到了同样的问题。
在寻找解决方案之后,终于这对我有用:使用 SSH 密钥
(也许还有其他解决方案,我不知道!)

这是我的方法一步一步解决问题:

  1. Generate a new SSH key / Add it to the ssh-agent

  2. Add the new generated SSH key to your GitHub account

  3. Clone the repository using SSH[单击 SSH 选项卡!]
    (我建议您在与当前工作路径不同的新文件夹上进行测试)

    而已。现在尝试拉/推。一切都应该工作
    打开文件.git/config如果您注意到,[remote "origin"] 中的 URL 参数值发生了变化!


    这里有用的文档:
    Connecting to GitHub with SSH
    Testing your SSH connection
    Working with SSH key passphrases

【讨论】:

    猜你喜欢
    • 2015-03-23
    • 2018-04-29
    • 2011-05-11
    • 1970-01-01
    • 2012-07-07
    • 2013-08-04
    • 2018-12-12
    • 1970-01-01
    • 2021-05-12
    相关资源
    最近更新 更多