use*_*511 6 git ssh bitbucket jenkins
我无法让Jenkins通过SSH在BitBucket上克隆git存储库.它失败了以下消息:
Building in workspace /var/lib/jenkins/workspace/test
[ssh-agent] Using credentials git (git@bitbucket.org:<user>/<repo>.git)
[ssh-agent] Looking for ssh-agent implementation...
[ssh-agent] Java/JNR ssh-agent
[ssh-agent] Started.
Checkout:test / /var/lib/jenkins/workspace/test - hudson.remoting.LocalChannel@2b619bca
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Command "git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: ssh: connect to host bitbucket.org port 22: Connection refused
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
尝试使用形式的URL克隆构建中的存储库
git@bitbucket.org:<user>/<repo>.git
我也尝试过不使用凭证管理器并手动安装密钥/var/log/jenkins/.ssh/
,但无济于事.
我有什么想法我做错了吗?
正如@ user1562655建议的那样,克隆因另一个问题而失败 - 在这种情况下防火墙阻止了端口22上的传出ssh.
修复是使用端口443(服务器允许这样),以及不同的BitBucket URL:
ssh://git@altssh.bitbucket.org:443/<user>/<repo>.git
Run Code Online (Sandbox Code Playgroud)
…代替
ssh://git@bitbucket.org:<user>/<repo>.git
Run Code Online (Sandbox Code Playgroud)
有关该计划的更多信息,请点击此处:
UsetheSSHprotocolwithBitbucket-SSHonPort443
归档时间: |
|
查看次数: |
25241 次 |
最近记录: |