Windows 下的 git 代理配置
经过不断的尝试,我找到找到了属于我的正确配置方法
Host github.com
User git
Port 443
Hostname ssh.github.com
IdentityFile "C:\Users\用户名\.ssh\id_rsa"
TCPKeepAlive yes
ProxyCommand "C:\Users\用户名\scoop\apps\git\current\mingw64\bin\connect.exe" -S 127.0.0.1:7890 -a none %h %p
Host ssh.github.com
User git
Port 443
Hostname ssh.github.com
IdentityFile "C:\Users\用户名\.ssh\id_rsa"
TCPKeepAlive yes
ProxyCommand "C:\Users\用户名\scoop\apps\git\current\mingw64\bin\connect.exe" -S 127.0.0.1:7890 -a none %h %p
使用 ssh 命令测试没问题,实际使用也正常了
$ ssh -T [email protected]
Hi Deali-Axy! You've successfully authenticated, but GitHub does not provide shell access.
如果出现路径错误的问题,可以换成 mingw64 里的路径