在Windows上的代理后面的git中的SSH - 致命:连接由对等关闭

时间:2016-12-14 16:16:47

标签: windows ssh proxy bitbucket git-bash

通过 SSH连接,我尝试使用 Git Bash 从使用7999端口(而不是Bitbucket.org)的公司BitBucket克隆存储库。我已生成RSA密钥,并将公钥添加到我的BitBucket公司的个人资料中,密钥位于~/.ssh,我已使用git config --global http.proxy http://userPrx:pwdPrx@ipProx:8080设置代理(因为我是在公司代理服务器下的,我也设置了我的config文件post建议。然后,当我尝试测试连接时,我得到了这个:

$ ssh -vT globaldevtools -p 7999
OpenSSH_7.3p1, OpenSSL 1.0.2j  26 Sep 2016
debug1: Reading configuration data /c/Users/MyUser/.ssh/config
debug1: /c/Users/MyUser/.ssh/config line 5: Applying options for globaldevtools
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Executing proxy command: exec /C/Users/MyUser/AppData/Local/Programs/Git/mingw64/bin/connect.exe -S IpProxy:8080 x.x.x.x 7999
debug1: permanently_drop_suid: 1104711
debug1: identity file /c/Users/MyUser/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/MyUser/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3
FATAL: Connection closed by peer.
ssh_exchange_identification: Connection closed by remote host

这是我的config文件:

ProxyCommand /C/Users/MyUser/AppData/Local/Programs/Git/mingw64/bin/connect.exe -S IpProxy:8080 %h %p


Host globaldevtools
  User git
  Port 7999
  Hostname x.x.x.x
  IdentityFile ~/.ssh/id_rsa
  TCPKeepAlive yes
  IdentitiesOnly yes

我必须在此文件中指出(config)而不是IpProxy:8080我已尝试

http://IpProxy:8080
http://usrProx:pwdProx@IpProxy:8080
usrProx:pwdProx@IpProxy:8080

我还需要做别的吗?我错过了什么?感谢所有帮助。

0 个答案:

没有答案