简体   繁体   English

Jenkins无法连接到Bitbucket云

[英]Jenkins Unable to connect to Bitbucket cloud

I am setting up project in Jenkins where I have to pull code from bitbucket cloud. 我正在詹金斯(Jenkins)设置项目,在这里我必须从bitbucket云中提取代码。

I am seeing errors in Jenkins. 我在詹金斯(Jenkins)中看到错误。 Thing is Jenkins is unable to connect to bitbucket cloud. 事情是詹金斯无法连接到位桶云。

Environment 环境
Jenkins : Internally hosted ; 詹金斯:内部托管; http://jenkinsserver:8080 http:// jenkinsserver:8080
Bitbucket cloud : https://bitbucket.org/ Bitbucket云: https : //bitbucket.org/
Git plugin version:3.5.1 Git插件版本:3.5.1

Logs from Jenkins 詹金斯的原木

Started by user admin
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/workspace/AccessbitbucketCloud
 > /opt/git/git-2.14.1/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > /opt/git/git-2.14.1/git config remote.origin.url https://bitbucket.org/myid/testpublicrepo.git # timeout=10
Fetching upstream changes from https://bitbucket.org/myid/testpublicrepo.git
 > /opt/git/git-2.14.1/git --version # timeout=10
using GIT_ASKPASS to set credentials For bitbucket Cloud
Setting http proxy: jenkinsserver:8080
 > /opt/git/git-2.14.1/git fetch --tags --progress https://bitbucket.org/myid/testpublicrepo.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://bitbucket.org/myid/testpublicrepo.git
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:817)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1084)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1115)
    at hudson.scm.SCM.checkout(SCM.java:495)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
    at hudson.model.Run.execute(Run.java:1735)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:405)
Caused by: hudson.plugins.git.GitException: Command "/opt/git/git-2.14.1/git fetch --tags --progress https://bitbucket.org/myid/testpublicrepo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: fatal: unable to access 'https://bitbucket.org/myid/testpublicrepo.git/': Received HTTP code 407 from proxy after CONNECT

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1924)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1643)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:352)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:815)
    ... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE

Looks like you are using a proxy to connect to the Bitbucket cloud. 看起来您正在使用代理连接到Bitbucket云。 Have you tried doing a git clone of this repository on the jenkins server (using the command line shell)? 您是否尝试过在jenkins服务器上使用此命令行存储库对此仓库进行git克隆?

stderr: fatal: unable to access ' https://bitbucket.org/myid/testpublicrepo.git/ ': Received HTTP code 407 from proxy after CONNECT stderr:致命问题:无法访问“ https://bitbucket.org/myid/testpublicrepo.git/”:CONNECT后从代理接收到HTTP代码407

It looks like a the proxy is not able to connect to the bitbucket cloud. 代理似乎无法连接到位桶云。 HTTP 407 is proxy authentication error. HTTP 407是代理身份验证错误。 This is a good thread about git connection over proxy for jenkins. 是一个关于通过詹金斯代理进行git连接的好线程。

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

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