【问题标题】:cloning a private git repo in jenkins, bitbucket在 jenkins、bitbucket 中克隆一个私人 git 存储库
【发布时间】:2013-01-16 21:06:51
【问题描述】:

我在使用 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

【问题讨论】:

    标签: git github jenkins bitbucket


    【解决方案1】:

    好的,愚蠢的修复。

    在 jenkins 中,我像他们的示例一样将 reqpository url 放入项目配置中

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

    不正确,应该是

    git@bitbucket.org:me/project.git

    【讨论】:

      猜你喜欢
      • 2020-09-23
      • 2019-12-26
      • 2015-03-09
      • 2020-01-14
      • 1970-01-01
      • 2021-02-22
      • 1970-01-01
      • 1970-01-01
      • 2016-04-08
      相关资源
      最近更新 更多