Git repository `xxx.git` not found 问题

这两天,在家打开 Android Studio (Windows)突然发现,git 无法连上。

然后试试挂科学,可以访问 github 网页,但是终端 git 命令依然还是提示 repository not found

再试 ping github.com ,发现 github 被解析到了 ::1127.0.0.1

已知 C:\Windows\System32\drivers\etc\hosts 文件并没有对 github 作任何处理,由此猜测是被 dns 劫持了,所以修改 hosts 文件,指定 github 解析到的 ip。

执行 ipconfig /flushdns 后,发现 git 已经恢复正常。

发表评论


*