繁体   English   中英

在jenkins,bitbucket中克隆一个私人git repo

[英]cloning a private git repo in jenkins, bitbucket

我在与詹金斯(Jenkins)克隆私人bitbucket存储库时出错。 我从这里开始遵循调试步骤:

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

  1. 创建ssh密钥将ssh密钥添加到bitbucket中作为部署密钥
  2. 使用服务器上我的用户帐户中的ssh密钥成功克隆了该存储库
  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

好吧,傻瓜修复。

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

SSH://git@bitbucket.org:我/ project.git

哪个不正确,应该是

git@bitbucket.org:我/ project.git

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM