0

我在使用 Jenkins 克隆私人 bitbucket 存储库时出错。我已经按照这里的调试步骤进行操作:

https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin

  1. 创建 ssh 密钥 将 ssh 密钥添加到 bitbucket 作为部署密钥
  2. 使用服务器上我的用户帐户中的 ssh 密钥成功克隆了该 repo
  3. 将密钥和已知主机复制到 C:\Windows\SysWOW64\config\systemprofile.ssh
  4. 检查 Jenkins 服务是否在本地系统帐户下运行
  5. 开始构建然后 -> 错误

我究竟做错了什么?

ERROR: Error cloning remote repo 'origin' : Could not clone ssh:///git@bitbucket.org:myUsername/myRepo.git
    hudson.plugins.git.GitException: Could not clone ssh:///git@bitbucket.org:myUsername/myRepo.git
    Caused by: hudson.plugins.git.GitException: Command "git.exe clone --progress -o origin ssh:///git@bitbucket.org:myUsername/myRepo.git C:\Program Files (x86)\Jenkins\workspace\myProject" returned status code 128:
    stdout: Cloning into 'C:\Program Files (x86)\Jenkins\workspace\myProject'...

    stderr: ssh: connect to host  port 22: Bad file number
    fatal: The remote end hung up unexpectedly
4

1 回答 1

4

好的,愚蠢的修复。

在詹金斯我像他们的例子一样在项目配置中放入 reqpository url

ssh://git@bitbucket.org:me/project.git

哪个不正确,应该是

git@bitbucket.org:me/project.git

于 2013-02-01T14:37:26.533 回答