新建远程仓库后,在本地使用ng new 创建了一个angular项目,然后分别用使用一下命令推送到远程新建的仓库:
git init
git add .
git commit -m "init project"
git remote add origin "远程仓库http url"
git push origin master
时报错:fatal: unable to access 'https://github.com/SifiaZiwan/ng-myWYY.git/': Failed to connect to github.com port 443 after 21106 ms: Timed out
网上找了取消代理设置的方法:
git config --global http.proxy
git config --global https.proxy
没有解决问题。
后来找到解决办法:https://blog.csdn.net/weixin_45698935/article/details/106599630
我的解决过程:
1. 在C:\Windows\System32\drivers\etc 中使用记事本打开hosts文件
注释了 github 的IP地址和域名的映射,
# Github Start
#192.30.253.118 gist.github.com
#192.30.255.112 github.co