这个文章记录了一些常见的git报错问题(大部分是由于网络或者代理设置不到位)

错误1: fatal: unable to access : Failed to connect to github.com port 443: Timed out

**解决办法:**使用下列命令

1
git config --global http.proxy http://127.0.0.1:7890

错误2: fatal: unable to access : OpenSSL SSL_read: Connection was reset, errno 10054

**解决办法:**使用下列命令

1
git config --global http.sslVerify "false"

**错误3:**fatal: unable to access : Failed to connect to 127.0.0.1 port 7890: Connection refused

**解决办法:**网络代理错误,使用下列代码取消代理

1
2
3
4
5
6
7
8
git config --global -l
# 显示当前git设置
# http.sslverify=false
# http.proxy=http://127.0.0.1:7890

git config --global --unset http.proxy http://127.0.0.1:7890
git config --global -l
# 恢复正常

错误n:

解决办法: