Git提交代码issue

2019/1/11 posted in  其它

问题①:

fatal:unable to access 'https://github.com/xxx/xxx.git' OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com 443
解决方法:
env命令设置GIT_SSL_NO_VERIFY环境变量为”ture”,并同时调用正常的git clone命令 env GIT_SSL_NO_VERIFY=true git clone https://github.com/xxx/xxx.git     
当你通过HTTPS访问Git远程仓库,如果服务器的SSL证书未经过第三方机构签署,那么Git就会报错。在克隆完毕的仓库中还需要将http.sslVerify设置为”false”。完整的命令如下:    
git config http.sslVerify "false"、

问题②:

Failed to connect to 127.0.0.1 port 1080: Connection refused
查询是否使用代理:git config --global http.proxy 
取消代理:git config --global --unset http.proxy
解决方法:
终端走代理,在终端中直接运行命令
export http_proxy=http://proxyAddress:port
这个办法的好处是简单直接,并且影响面很小(只对当前终端有效,退出就不行了)。

如果你用的是ss代理,在当前终端运行以下命令,那么wget curl 这类网络命令都会经过ss代理
export ALL_PROXY=socks5://127.0.0.1:1080