【发布时间】:2015-07-09 17:00:58
【问题描述】:
我正在尝试使用 bitbucket 在 git 中设置我的 tomcat 项目。
我有一个安装了 tomcat 和 jenkins 的远程服务器。
我配置了java sdk和maven。
我使用许多帖子中建议的 bitbicket url
https://user:pass@bitbucket.org/user/project.git
但是当它构建它时会抛出这个:
Started by user anonymous
Building in workspace /root/.jenkins/jobs/PROJECT/workspace
git rev-parse --is-inside-work-tree # timeout=10 从远程 Git 存储库获取更改 git config remote.origin.url https://USER:mypass@bitbucket.org/USER/PROJECT.git # timeout=10 从https://USER@bitbucket.org/USER/PROJECT.git 获取上游更改 git --version # timeout=10 git fetch --tags --progress https://USER@bitbucket.org/USER/PROJECT.git +refs/heads/:refs/remotes/origin/ 错误:获取远程 repo 'origin' 时出错 hudson.plugins.git.GitException:无法从https://USER@bitbucket.org/USER/PROJECT.git 获取 在 hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735) 在 hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983) 在 hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016) 在 hudson.scm.SCM.checkout(SCM.java:485) 在 hudson.model.AbstractProject.checkout(AbstractProject.java:1282) 在 hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) 在 jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 在 hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) 在 hudson.model.Run.execute(Run.java:1744) 在 hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) 在 hudson.model.ResourceController.execute(ResourceController.java:98) 在 hudson.model.Executor.run(Executor.java:374) 引起:hudson.plugins.git.GitException:命令“git fetch --tags --progress https://USER@bitbucket.org/USER/PROJECT.git +refs/heads/:refs/remotes/origin/”返回状态码 128: 标准输出: stderr: error: The requested URL returned error: 401 while access https://USER@bitbucket.org/USER/PROJECT.git/info/refs
致命:HTTP 请求失败
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733)
... 11 more
错误:获取远程 repo 'origin' 时出错 完成:失败
请帮忙!
【问题讨论】:
-
HTTP 401 表示“未经授权” - 您确定您使用了正确的密码吗?
标签: git maven tomcat jenkins bitbucket