关于IDEA(VScode)中github push时连接失败的问题解决
1. git clone遇到错误 fatal: unable to access ‘http://github.com/xxx‘: Failed to connect to github.com port
(1).查看git配置信息
git config --list
如果没有user.name和user.email信息,则说明没有进行过git配置,转入第二步:
(2). user.name和user.email配置
git config --global user.name "github_name"
git config --global user.email "email"
此处github_name是你的github用户名,email则是github的email
配置完成可以用第一步的命令查看配置是否成功。
(3). 使用指令实现免密
ssh -keygen -t rsa -C "github-name"
(4). 在github上的设置中填写公钥信息SSH key,需要自行生成并填入,具体怎么查看公钥,使用命令行
cat /root/.ssh/id_rsa.pub
将得到的公钥密码复制下来
(5). 将公钥复制到github上
(6). 检查是否能使用,在vscode终端键入命令行
ssh -T git@github.com
如果不成功则进行下一步配置
(7). 修改.ssh配置文件
vim ~/.ssh/congig
添加以下内容
Host github.com
Hostname ssh.github.com
Port 443
:wq 保存退出
(8). 重复第六步命令查看配置是否成功,能否正常使用。
2. IDEA push提交报错:OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
原因:
是Git的Http代理的问题,Git支持三种协议:git://、ssh:// 和 http://,本来push的时候应该走ssh隧道的,但是因为设置了http代理,所以就走了http的代理,于是就提交不了了。
解决办法:
方法一:网络问题,过会重试
方法二:取消http设置
git config --global --unset http.proxy
重启IDEA,重新push
3.错误fatal:unable to access ‘http://github.com/XXX/XXX.git/’:OpenSSL SSL_connect
git config --global http.sslVerity false
git config --global http.sslVerity false
————————————————
版权声明:本文为CSDN博主「flow_laic」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_43876014/article/details/120482512