繁体   English   中英

Jenkins无法建立Bitbucket储存库失败

[英]Bitbucket repository not build failed in Jenkins

我在jenkins中创建了一个项目,并添加了存储库URL,进行了保存并尝试构建,但出现以下错误:

Started by user Ayotunde Salako
Building in workspace /var/lib/jenkins/workspace/project
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url         https://user:pass@bitbucket.org/company/repo.git # timeout=10
Fetching upstream changes from     https://user:pass@bitbucket.org/company/repo.git
> git --version # timeout=10
> git fetch --tags --progress     https://user:pass@bitbucket.org/company/repo.git      +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from     https://user@bitbucket.org/companyhttps://user@bitbucket.org/company/repo.gitids/repo.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1051)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1082)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
at     hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at     jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at     hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1720)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:401)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags     --progress https://user@bitbucket.org/company/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: remote: Invalid username or password. If you log in via a     third party service you must ensure you have an account password set in     your account profile.
fatal: Authentication failed for     'https://user@bitbucket.org/company/repo.git/'

at     org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImp    l.java:1752)
at     org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials    (CliGitAPIImpl.java:1495)
at     org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.jav    a:64)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
... 11 more
ERROR: null
Finished: FAILURE

请问我做错了什么? Jenkins已安装在CentOs服务器上。

我们正在使用Bitbucket托管我们的Git存储库。

我已经使用ssh URL(而不是http + user / password)配置了我所有的Jenkins作业。 我所有的奴隶都使用相同的ssh密钥,并且我在所有Bitbucket项目中都声明了此密钥。

为Bitbucket云设置SSH的有用链接

我建议使用此方法与Jenkins克隆您的存储库。

如果您更喜欢使用HTTPS URL,请使用以下解决方案

我希望这会有所帮助:)

暂无
暂无

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

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