报错汇总:
1.fatal: unable to access 'https://github.com/formoree/Machine-learing-based-on-tf.git/': OpenSSL SSL_read: Connection was reset, errno 10054
2.fatal: unable to access 'https://github.com/formoree/Machine-learing-based-on-tf.git/': Failed to connect to 127.0.0.1 port 19180: Connection refused
3.fatal: unable to access 'https://github.com/formoree/Machine-learing-based-on-tf.git/': OpenSSL SSL_read:Time out
上面的三种报错其实都是一个性质,无法连接上github。我们解决上述问题分为以下几个步骤:
网络连接问题
使用浏览器登录Github网站,如果无法连接,便是网络问题。这里你可以更改host文件,更换github登录的IP地址,这里我们就不过多赘述。
代理问题
如果说github官网能够正常显示,那网络连接是没有问题的可能是代理出错了。那么我们调用这两行代码更改代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
更改gitconfig文件url
以上方法如果都无效,我们可以尝试更改url。我们可以直接在项目所在的.git文件夹中修改config文件的url内容
具体的代码操作见解决git报错,我是将https改为git,就成功了。我也不清楚之中的原理是什么,有知道的大佬可以在评论区解答一下。感谢!