git通过代理使用ssh协议(备忘)

之前通过文档很容易实现了git协议,详见: http://www.gromacs.org/Developer_Zone/Git/Git_Tutorial#Git_behind_a_proxy

鉴于ssh才是读/写的王道,折腾了半天,终于找到一条可行之路:
1.下载corkscrew
2.编辑~/.ssh/config
Host gitproxy
User git
Hostname your.com
Port 22
ProxyCommand /usr/bin/corkscrew yourproxy.com proxyport %h %p
#签名文件
IdentityFile ~/.ssh/id_rsa

3.使用:
git clone git@gitproxy:/yourgitdir.git


好了,齐活...

网上有一堆nc之类的用法,反正我是没成功过.
另:代理有权限的话:最后一行
ProxyCommand /usr/bin/corkscrew yourproxy.com proxyport %h %p user:pass

Good Luck!

-------------------------------
另,如果用cntlm做代理的话,或许更新一下会有惊喜哦~

猜你喜欢

转载自iyuan.iteye.com/blog/1672982