我发现本地浏览器可以访问,但是 push 代码是超时的。
阿里云服务器也是无法 clone 到代码的。
如何破?
阿里云服务器也是无法 clone 到代码的。
如何破?
|
qsAug 28, 2025 via iPhone
1
老码农应该习以为常了,还是常备梯子
|
|
3
@tmkook 没开 tun 模式 兄弟
|
|
FoxkehAug 28, 2025
4
症状不一样是因为浏览器连 github 是走 https 连接, push 是走 ssh
git 本地代理设置好就可以了 |
|
shadowyueAug 28, 2025
5
我发现有了梯子这种傻瓜式的工具以后,就算是程序员动手能力也在下降。
git config proxy 不配的吗 |
|
JoeJasperAug 28, 2025
6
不要走 https 协议,clone 用 ssh 协议
|
|
7
你的梯子服务商把 ssh 协议 or 22 端口封了,需要设置下 git via https
https://manateelazycat.github.io/2022/05/29/git-via-https/ |
|
8
ssh config 里加上
``` Host github.com HostName ssh.github.com Port 443 User git ``` ref: https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port#enabling-ssh-connections-over-https |
|
tsjaAug 28, 2025
9
学习评论区各位教程了,我之前的办法是本地 push 远程仓库同时设置 GitHub 和 Gitee ,云服务 pull 代码用 Gitee
|
|
11
之前用着都没问题突然就不行了,就是梯子服务商把 22 或 ssh 禁用了,按照 7 楼和 8 楼的方法可以解决。
|
|
paulluisAug 28, 2025 via iPhone
12
同今天早上发现 push 一直连接失败,配置临时 proxy 就成功了 git config http.proxy http://127.0.0.1:10808
|
|
340746Aug 28, 2025 via Android
14
用的 GitHubdeskop ,会自动走系统代理
不会用 git 命令😂 |
|
wenrouxiaozhuAug 28, 2025
15
@shadowyue 我一般
proxy='export https_proxy=http://127.0.0.1:7890;export http_proxy=http://127.0.0.1:7890;export all_proxy=socks5://127.0.0.1:7890' unproxy='unset https_proxy http_proxy all_proxy' |
|
waltergggAug 29, 2025 via iPhone
16
是的,我也是把 git 代理设置成小猫咪的,不过怎么连 push 代码都不让?是不准程序员上班了吗?还是说必须要程序员翻墙啊。
|
|
BorchAug 29, 2025
17
应该是梯子服务商把 22 端口封了,改 443 端口也不行,估计一起封了。
stackoverflow 搜一下就解决了,仓库目录 git config --local -e ,弹出文件编辑,[email protected]:改为 https://github.com/ 。 |
|
muamAug 29, 2025
18
08 年开始就习以为常了,每年特殊时期都会抽风,稳定的梯子还是很重要的
|