github无法访问的解决实践

无废话版:

-----------------------------

1.复制下面内容,添加到hosts文件里(C:WindowsSystem32driversetc)不能修改的话,则把文件复制出去改完再直接粘贴过来

2.执行:ipconfig /flushdns(刷线dns解析)

192.30.253.113     github.com
185.199.108.153    github.github.io
151.101.72.133     assets-cdn.github.com
151.101.185.194    github.global.ssl.fastly.net

原理:访问网址时先搜索hosts文件,如果由网址对应的ip则不需要dns域名解析,因此可以将网址的ip配成静态ip,减少解析过程,提高访问速度。

git-针对于个人账户-免密更新

 https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

 

.

原文地址:https://www.cnblogs.com/vip-deng-vip/p/12233242.html