【发布时间】:2022-04-21 17:33:21
【问题描述】:
我正在 Jenkins 中设置项目,我必须从 bitbucket 云中提取代码。
我在 Jenkins 中看到了错误。问题是 Jenkins 无法连接到 bitbucket 云。
环境
詹金斯:内部托管; http://jenkinsserver:8080
比特桶云:https://bitbucket.org/
Git插件版本:3.5.1
来自 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
【问题讨论】:
标签: git jenkins bitbucket jenkins-plugins