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

2021-05-17  本文已影响0人  小狼小狼_e211
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
上一篇 下一篇

猜你喜欢

热点阅读