Git/代理:修订间差异
来自康健生活
| 第98行: | 第98行: | ||
</syntaxhighlight>|$|/home/kangkk}} | </syntaxhighlight>|$|/home/kangkk}} | ||
=== windows === | === windows === | ||
配置文件 | |||
{{hc|head=~/.ssh/config|output=<syntaxhighlight lang="bash"> | |||
## github proxy | |||
# | |||
# 别名 | |||
Host github.com | |||
User git | |||
# 目标端口号 | |||
Port 22 | |||
# 目标主机名 | |||
HostName github.com | |||
# 指定的私钥地址 | |||
IdentityFile "C:\Users\kwy\.ssh\id_ed25519" | |||
# TCPKeepAlive yes | |||
# git bash 包含 connect.exe | |||
# -S 使用 socket | |||
ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -S 192.168.51.34:1080 -a none %h %p | |||
Host ssh.github.com | |||
User git | |||
Port 22 | |||
HostName ssh.github.com | |||
IdentityFile "C:\Users\kwy\.ssh\id_ed25519" | |||
# TCPKeepAlive yes | |||
ProxyCommand "C:\Program Files\Git\mingw64\bin\connect.exe" -S 192.168.51.34:1080 -a none %h %p</syntaxhighlight>}} | |||
测试联通 | 测试联通 | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
ssh -T git@github.com</syntaxhighlight>|$|/home/kangkk}} | ssh -T git@github.com</syntaxhighlight>|$|/home/kangkk}} | ||