魔术上网导致Github push 443 问题解决方法

问题描述

使用“ke xue 上网”工具后,在 IDEA 中 push 代码到 github 时,报错:Failed to connect to github.com port 443: Operation timed out。同时,使用浏览器访问 github 也会出现无法访问,偶尔能访问的情况。

解决办法

git config --global http.proxy http://127.0.0.1:1087
git config --global https.proxy http://127.0.0.1:1087

注意:上边端口号 1087 需要修改为自己使用的“魔术上网”工具代理的端口,不同工具,端口不同。

取消代理命令:

git config --global --unset http.proxy
git config --global --unset https.proxy

转载自:zhangyihao的博客:https://zhangyihao.github.io/2021/10/26/科学上网导致Github-push-443-问题解决方法/

posted @ 2024-07-26 12:46  ThirteenQ  阅读(26)  评论(0编辑  收藏  举报