Android studio GitHub push 报错:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
问题
如题目所示,在push项目的时候,在Android studio中提示:Push failed Unable to access 'https://github.com/D10NGYANG/x.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
意思其实就是连不上github.com:443
,但是在浏览器中访问GitHub是没有问题的,同样使用终端直接ping github.com也是没有问题的。那就很神奇了。
网上方法
1 取消全局代理
git config --global --unset http.proxy
git config --global --unset https.proxy
对我的情况无效
2 关闭SSL
git config --global http.sslVerify false
git config --global https.sslVerify false
对我的情况无效
最终解决方法
既然清空代理无效,我就想反其道而行之,增加代理
增加ssh配置文件
vi ~/.ssh/config
编辑
# 全局
#ProxyCommand connect -S 127.0.0.1:1080 %h %p
# 只为特定域名设定
Host github.com
ProxyCommand connect -S 127.0.0.1:1080 %h %p
其中-S代表走socks代理,如果需要使用HTTP/HTTPS代理的话使用-H