git - 如何解决 RHEL 容器上的 "shell request failed on channel 0"?

标签 git docker jenkins ssh

我正在尝试从 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 pull 时,我收到以下消息,表明我的公钥/私钥存在问题,但是由于上述问题,我无法通过容器进一步测试。
ERROR: Error cloning remote repo 'origin'
returned status code 128:

任何帮助将不胜感激。

最佳答案

the following messages indicating an issue with my public/private key



这不是您的 key 的问题。如果是这样,您将看不到以下内容:
Authenticated to mystash.com ([10.xxx.xxx.xxx]:22).

这是服务器配置的问题。服务器日志或配置信息可能更有帮助。

关于git - 如何解决 RHEL 容器上的 "shell request failed on channel 0"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44201213/

相关文章:

git - 如何还原 `git fetch upstream; git merge upstream/master` ?

jenkins - 如何从命令行启动Jenkins管道?

python - 使用jenkins python模块build_job(job_name,parameters =)方法时出现500服务器错误

node.js - docker : MongooseError [MongooseServerSelectionError]: getaddrinfo ENOTFOUND mongo

docker log driver "json-file"滚动更新时日志丢失

docker - 在Windows 10上为tensorflow添加docker可访问的CPU

docker - 无法将 docker 镜像从 GCE 实例上的 Jenkins 推送到 google 容器注册表

git - git fetch不起作用-但 checkout 有效

php - 很难理解 Git 和 Github 在我的网络服务器上的位置

git - 如果 Github 中不存在自定义标签,则阻止 merge