【问题标题】:How to solve "shell request failed on channel 0" on RHEL container?如何解决 RHEL 容器上的“通道 0 上的 shell 请求失败”?
【发布时间】:2017-10-27 07:49:54
【问题描述】:

我正在尝试从 Jenkins 容器 (RHEL7) 连接到 Stash 存储库。连接似乎已成功进行身份验证,但不久之后就失败了。

 Connection established.
debug1: identity file /var/jenkins_home/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /var/jenkins_home/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/jenkins_home/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/jenkins_home/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/jenkins_home/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/jenkins_home/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/jenkins_home/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /var/jenkins_home/.ssh/id_ed25519-cert type -1

debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA 61:51:41:02:d0:fb:b7:42:2a:c9:37:85:1b:5f:44:97
debug1: Host 'mystash.com' is known and matches the RSA host key.
debug1: Found key in /var/jenkins_home/.ssh/known_hosts:35
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /var/jenkins_home/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to mystash.com ([10.xxx.xxx.xxx]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = C.UTF-8
shell request failed on channel 0

当我尝试通过我的 Jenkins 作业之一进行 GIT 拉取时,我收到以下消息,表明我的公钥/私钥存在问题,但是由于上述问题,我无法通过容器进一步测试。

ERROR: Error cloning remote repo 'origin'
returned status code 128:

任何帮助将不胜感激。

【问题讨论】:

标签: git docker jenkins ssh


【解决方案1】:

以下消息表明我的公钥/私钥存在问题

这不是您的密钥的问题。如果是这样,您将不会看到以下内容:

Authenticated to mystash.com ([10.xxx.xxx.xxx]:22).

服务器配置有问题。服务器日志或配置信息会更有帮助。

【讨论】:

    【解决方案2】:

    今天我遇到了同样的错误信息:

    我想通过

    在一个新的本地 vagrant 机器中克隆一个 bitbucket 存储库
    git glone git@git.servername.com/project/myrepo.git
    

    只是卡住了一条超时消息

    测试 ssh 连接

    ssh -T git@git.servername.com 
    

    显示错误: 通道 0 上的请求失败

    就我而言的原因/解决方案: 有人删除了(unsed)默认分支“master”。在我的情况下,更正 bitbucket 中的“默认”分支对我有帮助..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-20
      • 2016-12-22
      • 2018-03-23
      • 2017-02-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多