Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用螺旋钻通过代理建立到eclipse gerrit的ssh连接_Eclipse_Git_Ssh_Gerrit_Ssh Tunnel - Fatal编程技术网

无法使用螺旋钻通过代理建立到eclipse gerrit的ssh连接

无法使用螺旋钻通过代理建立到eclipse gerrit的ssh连接,eclipse,git,ssh,gerrit,ssh-tunnel,Eclipse,Git,Ssh,Gerrit,Ssh Tunnel,在我的研究所,我只能通过代理访问受限的互联网。我在与gerrit code review系统(git.eclipse.org)建立ssh连接时面临一些严重问题,因此无法向gerrit推出任何新补丁 为了执行上述任务,我首先尝试使用corkscrew通过HTTP传输SSH,遵循给出的说明 这就是我所做的: 已安装的开瓶器螺钉 在ssh配置中添加了ProxyCommand 向文件中添加了代理用户名和代理身份验证密码 ~/.ssh/proxyauth 在此之后,我成功地设置了一个连接到github的s

在我的研究所,我只能通过代理访问受限的互联网。我在与gerrit code review系统(git.eclipse.org)建立ssh连接时面临一些严重问题,因此无法向gerrit推出任何新补丁

为了执行上述任务,我首先尝试使用corkscrew通过HTTP传输SSH,遵循给出的说明 这就是我所做的:

  • 已安装的开瓶器螺钉
  • 在ssh配置中添加了ProxyCommand
  • 向文件中添加了代理用户名和代理身份验证密码 ~/.ssh/proxyauth
  • 在此之后,我成功地设置了一个连接到github的ssh,并对我的github repo进行了推/拉更改

    但我无法通过ssh连接到gerrit。下面是确切的错误:

    $ssh -p 29418 jgupta@git.eclipse.org
    Proxy could not open connnection to git.eclipse.org:  Forbidden
    ssh_exchange_identification: Connection closed by remote host
    
    我正在使用Linux(RHEL 6.3 Beta x86_64)和git 1.7.11.1(最新版本)。
    my~/.ssh/config的内容如下:

    Host github.com
      Hostname ssh.github.com
      Port 443
      ProxyCommand corkscrew 202.141.80.22 3128 %h %p ~/.ssh/proxyauth
    
    Host *
      ProxyCommand corkscrew 202.141.80.22 3128 %h %p ~/.ssh/proxyauth
    
    对git.eclipse.org的ssh请求的详细(错误)结果是:

    penSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
    debug1: Reading configuration data /home/jayant/.ssh/config
    debug1: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Executing proxy command: exec corkscrew 202.141.80.22 3128 git.eclipse.org 29418 ~/.ssh/proxyauth
    debug1: permanently_drop_suid: 500
    debug1: identity file /home/jayant/.ssh/identity type -1
    debug2: key_type_from_name: unknown key type '-----BEGIN'
    debug2: key_type_from_name: unknown key type 'Proc-Type:'
    debug2: key_type_from_name: unknown key type 'DEK-Info:'
    debug2: key_type_from_name: unknown key type '-----END'
    debug1: identity file /home/jayant/.ssh/id_rsa type 1
    debug1: identity file /home/jayant/.ssh/id_dsa type -1
    Proxy could not open connnection to git.eclipse.org:  Forbidden
    ssh_exchange_identification: Connection closed by remote host
    
    my git repo中设置的远程url为:

    $git remote -v
    origin  http://git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git (fetch)
    origin  http://git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git (push)
    review  ssh://jgupta@git.eclipse.org:29418/etrice/org.eclipse.etrice.git (fetch)
    review  ssh://jgupta@git.eclipse.org:29418/etrice/org.eclipse.etrice.git (push)
    
    几天前,当我可以直接访问互联网时,我可以通过ssh连接,也可以通过上面的远程设置推送我的补丁

    我尝试删除已知主机的内容,但没有任何帮助。
    这是gerrit服务器的问题吗


    提前感谢您的帮助。

    我觉得问题是由于不支持服务器配置造成的。这是我在网上的一篇博文中发现的:

    基本思想是您将以某种方式调用socat(一个类似的实用程序) 将与HTTP(S)代理服务器进行协商 使用CONNECT方法为服务器提供一个干净的管道 远侧。

    注意到许多公司防火墙阻止对 github的好心人已经在443以外的端口上使用了CONNECT方法 如果使用主机“ssh.github.com”,则在443上侦听的ssh服务器, 因此,您可以在上面的ssh配置中替换主机名和端口 适当的节,你们都准备好了

    以上摘录摘自

    我的感觉是,由于gerrit正在端口29418上运行,并且由于代理通常只允许访问远程主机(服务器)端口443上的请求的CONNECT方法,因此gerrit的ssh请求无法在代理上协商

    github不会发生这种情况,因为它在端口443上提供ssh请求,而客户端实用程序(如corkscrew)可以通过在远程服务器的端口443上发送发送请求来协商代理(如上面的.ssh/config快照所示)

    有人知道执行上述任务的其他方法吗