fatal: unable to access 'https://github.com/xxx/': Failed to connect to github

38 阅读1分钟

前言

push代码总是卡半天, 我受不了了!!!!!😡😡😡😡😡😡😡🔥🔥🔥🔥💢💢💢💢💢💢

报错描述

push 代码的时候,报错如下:

git push origin master
fatal: unable to access 'https://github.com/Jjqcoder/xxx/': Failed to connect to github.com port 443 after 21062 ms: Couldn't connect to server

解决

  1. win + i , 左上角输入 代理 , 点击 代理服务器设置

image.png 2. 点击 编辑

image.png

在弹出的窗口中记住端口号:

image.png

  1. win + r 输入 cmd, 输入如下内容,将你的端口号替换成上方的端口号即可
git config --global http.proxy http://127.0.0.1:你的端口号
git config --global https.proxy http://127.0.0.1:你的端口号

最后

绑好安全带

现在 push 的速度已经起飞了

🤟