目录
异常1:Failed to connect to github.com port 443: Timed out
异常2:OpenSSL SSL_read: Connection was aborted, errno 10053
异常3 github拉取代码报错 unsafe repository
异常1:Failed to connect to github.com port 443: Timed out
取消http 、https 代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
设置全局代理:
git config --global http.proxy 127.0.0.1:你本机代理端口号
绑定github域名的host 见问题2,步骤3;
异常2:OpenSSL SSL_read: Connection was aborted, errno 10053
原因:
1) Git默认限制推送的大小,运行命令更改限制大小即可;
2) 是SSL校验:
3) github的域名代理问题,修改host即可。
解决办法:
调整全局请求缓存大小:
git config --global http.postBuffer 524288000
git config --global https.postBuffer 524288000
取消SSL校验:
git config --global http.sslVerify false
git config --global https.sslVerify false
访问:https://websites.ipaddress.com/
查询这两个域名的Ip:
1、github.com
2、github.global.ssl.fastly.net
配置host:
刷新 DNS:
ipconfig /flushdns
之后访问就可以了。
异常3 github拉取代码报错 unsafe repository
Cannot check the working tree for unmerged files because of an error. unsafe repository Can’t update repository (‘X:/xxx/xxx/xxx’ is owned by someone else)
To add an exception for this directory, call: Set the environment variable GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true and run again for more information.
在当前项目目录执行如下命令
git config --global --add safe.directory X:/xxx/xxx/xxx
如图执行之后就可以拉去代码。