如果网络环境无法直接进入github, 首先需要一个代理软件
-
打开代理, 确保能进入github
-
输入
git config --global -l查看
http.proxy=http.https://github.com.proxy=http.proxy=
-
检查
=之后的代理号是否与Windows设置->网络和Internet->手动设置代理中的默认代理相同 -
不相同, 输入:
git config --global http.proxy 127.0.0.1:<默认端口>
git config --global https.proxy 127.0.0.1:<默认端口>
git config --global http.https://github.com.proxy 127.0.0.1:<默认端口>
-
记得删
<> -
保证直接使用本地端口连接
如果能够不使用代理直接进入, 输入 git config --global -l查看
http.proxy=http.https://github.com.proxy=http.proxy=
-
确保Windows
设置->网络和Internet->手动设置代理没有打开 -
检查
=之后的代理号是否与Windows设置->网络和Internet->手动设置代理中的默认代理相同 -
如果相同, 输入
git config --global --unset http.proxy
git config --global --unset https.proxy
解除代理, 并输入ipconfig /flushdns刷新缓存