1.githup网站打不开
一、确定ip
进入网址https://github.com.ipaddress.com
二、确定域名ip
进入网址github.global.ssl.Fastly.net ᐅ Learn more about Fastly
三、确定静态资源ip
进入网址assets-cdn.Github.com ᐅ Learn more about Github
185.199.108.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
四、修改hosts文件
Windows系统:打开C:\Windows\System32\drivers\etc
找到hosts文件,可以使用notepad打开,如果没有,右键选择打开方式为记事本即可。
在底部加入前三步获得的内容,即:
140.82.112.3 github.com 199.232.69.194 github.global.ssl.fastly.net 185.199.108.153 assets-cdn.github.com 185.199.110.153 assets-cdn.github.com 185.199.111.153 assets-cdn.github.com
保存并退出即可
2. 下载githup代码出现Unknown SSL protocol error in connection to github.com:443
使用命令行修改
git config --global http.proxy 127.0.0.1:8087
git config --global http.sslVerify false
或者是修改.gitconfig文件
3.下载githup代码出现Failed to connect to 127.0.0.1 port 8087: Connection refused
git config --global --unset http.proxy
或者是删除.gitconfig文件中的http.proxy