首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装jenkins以使用gitBucket git存储库

安装jenkins以使用gitBucket git存储库
EN

Stack Overflow用户
提问于 2017-02-28 09:33:38
回答 1查看 312关注 0票数 0

我正在詹金斯内部创建一个Maven项目。maven项目需要从托管在GitBucket中的git存储库获取源代码。Jenkins和GitBucket运行在不同的Windows服务器上,并在中运行。

我找到了不同的页面和教程来设置这个,但没有任何运气。当我在cmd中尝试使用相同的命令时,一切都会正常工作。

我在运行Jenkins任务时遇到的错误如下:

代码语言:javascript
复制
09:47:05 Building in workspace D:\Jenkins\workspace\CR-IT server
09:47:05  > D:\Applications\ThirdParty\x64\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
09:47:05 Fetching changes from the remote Git repository
09:47:05  > D:\Applications\ThirdParty\x64\Git\bin\git.exe config remote.origin.url http://airsbeap0658/gitbucket/git/air27654/CR_IT_Platform_Server.git # timeout=10
09:47:05 Fetching upstream changes from http://airsbeap0658/gitbucket/git/air27654/CR_IT_Platform_Server.git
09:47:05  > D:\Applications\ThirdParty\x64\Git\bin\git.exe --version # timeout=10
09:47:05 using GIT_ASKPASS to set credentials 
09:47:05  > D:\Applications\ThirdParty\x64\Git\bin\git.exe fetch --tags --progress http://airsbeap0658/gitbucket/git/air27654/CR_IT_Platform_Server.git +refs/heads/*:refs/remotes/origin/*
09:57:05 ERROR: Timeout after 10 minutes
09:57:05 ERROR: Error fetching remote repo 'origin'
09:57:05 hudson.plugins.git.GitException: Failed to fetch from http://airsbeap0658/gitbucket/git/air27654/CR_IT_Platform_Server.git
09:57:05    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:806)
09:57:05    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
09:57:05    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
09:57:05    at hudson.scm.SCM.checkout(SCM.java:495)
09:57:05    at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
09:57:05    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
09:57:05    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
09:57:05    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
09:57:05    at hudson.model.Run.execute(Run.java:1728)
09:57:05    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
09:57:05    at hudson.model.ResourceController.execute(ResourceController.java:98)
09:57:05    at hudson.model.Executor.run(Executor.java:404)
09:57:05 Caused by: hudson.plugins.git.GitException: Command "D:\Applications\ThirdParty\x64\Git\bin\git.exe fetch --tags --progress http://airsbeap0658/gitbucket/git/air27654/CR_IT_Platform_Server.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
09:57:05 stdout: 
09:57:05 stderr: 
09:57:05    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1784)
09:57:05    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1513)
09:57:05    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
09:57:05    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
09:57:05    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:804)
09:57:05    ... 11 more
09:57:05 ERROR: null
09:57:05 Finished: FAILURE

有办法解决这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-28 12:11:40

我将Jenkins配置中的存储库url更改为包含用户和密码。

http://USER:PASSWORD@host/...

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42504985

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档