已解决:本地推送到GitHub的几个报错

OpenSSL SSL_read: Connection was reset, errno 10054

首先检查GitHub域名是否正确
查询地址
查询以下网址对应的域名
github.com
github.global.ssl.fastly.net
codeload.Github.com
然后打开host文件,该文件存放于C:\Windows\System32\drivers\etc
输入刚刚查询到的域名,如图

image.png

接着win + R打开 命令行,输入ipconfig /flushdns刷新DNS
可以ping一下网址看能不能连上

若不起作用
在此目录下打开git,右键选择 git bash here
输入

git config --global http.sslVerify "false"

解除SSL验证


image.png
! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'git@github.com:qiyuebuku/WxRobot.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决方法就是在push到远程服务器之前,先将本地仓库的变化连接到远程仓库主分支

git pull origin master
git push -u origin master
image.png
image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容