我_1926816_我有一个问题,jenkins从我们的回购中提取 .
我收到了"The remote end hung up unexpectedly"错误 .
08:26:19从git@my.gitrepo.net获取上游变化:myFork / myBranch.git 08:26:19> git --version #timeout = 10 08:26:19使用GIT_SSH设置凭据Jenkins用户gitlab 08:26:19> git fetch --tags --progress git@my.gitrepo.net:myFork/myBranch.git refs / heads /:refs / remotes / origin / 08:27:22错误:错误克隆远程仓库'origin'08:27:22 hudson.plugins.git.GitException:命令“git fetch --tags --progress git@my.gitrepo.net:myFork/myBranch.git refs / heads /:refs / remotes / origin / “返回状态码128:08:27:22 stdout:08:27:22 stderr:ssh:连接到主机my.gitrepo.net端口22:连接超时08:27:22致命:远程端意外挂断
我想也许远程无法访问,但我尝试使用
git ls-remote(our_repo.git)
在我的本地机器上它工作,所以也许这不是问题 . (我猜?)
是否需要考虑配置以确保连接正确?
也许正确的SSH . 目前我们已经设置了公共SSH .
1 回答
它可以在本地计算机上运行,这意味着您的公共ssh密钥(
$HOME/.ssh/id_rsa.pub
或%USERPROFILE%\.ssh\id_rsa.pub
)已在GitLab中注册 .如GitLab-Jenkins integration page中所述,您需要 setup a deploy key ,并确保它部署在您要访问的Git仓库上(请参阅GitLab项目的设置)