天天看点

CentsOS版本 git出现443

关于git push/git clone/ping www.github.com失败的问题

昨天打算git push一下自己虚拟机上的代码出现了下面状态

[[email protected] Linux]$ git push
fatal: unable to access 'https://github.com/Amos-Q/Linux.git/': Failed connect to github.com:443; Connection refused

           

同样ping也不通

[[email protected] Linux]$ ping www.github.com
PING github.com (13.229.188.59) 56(84) bytes of data.
^C
--- github.com ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1000ms

           
网上很多什么修改代理/删除代理,还有什么修改/etc/hosts文件都失败了

!!!!!最后找到一句代码指令就ok了:切换到root模式或者直接sudo

[[email protected] Linux]$ sudo yum -y update nss
           

然后就好了

[[email protected] Linux]$ git push
Username for 'https://github.com': 
Password for 'https://[email protected]': 
Everything up-to-date

           

继续阅读