Git日常使用和故障排查
fatal: unable to access : Failed to connect to github.com port 443: Timed out
一、重新设置远程仓库地址
git remote set-url origin XX
XX举例 : git@github.com:zhangsan/demo.git
再正常执行pull, push等操作
二、关掉第三方网络配置
git config --global --unset http.proxy //重置git的全局网络
git config --global http.proxy 127.0.0.1:7890 //设置全局网络
git config --local --unset http.proxy //重置项目的git
git config --local http.proxy 127.0.0.1:7890 //设置项目所用的git网络
//一般重置下项目的或者设置下项目网络配置,别打~,我不太清楚这玩意。。
三、检查能不能正常访问github
win进入dos窗口
ping github.com
如果100%丢包,可能需要改下hosts文件
最后再ping 下github,能正常访问了。
四、验证逻辑
上面三种方法,每次尝试后都试着pull或者push下,成功记得来反馈哦。。。
rebase
checkout
发现一个Git中文教程blog点我直达