Git踩坑----fatal unable to access 'httpgithub.comjpdjpdimg.git' OpenSSL SSL_read Connection was reset, errno 1005
本文最后更新于:2021年10月6日 晚上
Git踩坑—-fatal: unable to access ‘http://github.com/jpdjpd/img.git/': OpenSSL SSL_read: Connection was reset, errno 10054
今天把github一个仓库删了,然后重新上传,执行命令git push -u origin master
出现报错fatal: unable to access 'http://github.com/jpdjpd/img.git/': OpenSSL SSL_read: Connection was reset, errno 10054
找了一些教程,说是把 .git/cofig
中的url里https改成http就OK,但试了之后没有成功,可能由于我本地有两个不同的github账号的原因吧
还有一种说法就是:解除ssl验证后,再上传就OK了git config --global http.sslVerify "false"
,但是也没有成功.
我这里的正解:
修改.git/config
中的url为你github上仓库的ssh连接即可
把:
原来配置的git remote add origin https://github.com/jpdjpd/img.git
[remote "origin"]
url = https://github.com/jpdjpd/img.git
fetch = +refs/heads/*:refs/remotes/origin/*
改为:
[remote "origin"]
url = git@github.com:jpdjpd/img.git
fetch = +refs/heads/*:refs/remotes/origin/*
再进行git push -u origin master
即可
本文作者: CodeAnime
本文链接: https://codeanime.cc/Git%E8%B8%A9%E5%9D%91-fatal-unable-to-access-httpgithub-comjpdjpdimg-git-OpenSSL-SSL-read-Connection-was-reset-errno-1005.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!