【发布时间】:2014-01-04 14:36:31
【问题描述】:
我正在尝试在 Windows 7 环境中配置 Jenkins 以使用 Bitbucket 上的 Git 存储库,但是当我尝试进行构建时 - 我收到以下错误。
这是我正在使用的存储库 URL:
https://<MY_ID>:<MY_PASSWORD>@bitbucket.org/<MY_ID>/<MY_REPO_NAME>.git
不确定我是否需要为 Jenkins-Bitbucket 生成密钥,如果需要,谁能提供有关如何为 Windows 生成密钥的详细说明?
Started by user anonymous
Building in workspace C:\Users\<MY_NAME>\.jenkins\workspace\<MY_PROJECT>
Fetching changes from the remote Git repository
Fetching upstream changes from https://<MY_ID>@bitbucket.org/<MY_ID>/<MY_REPO_NAME>.git
FATAL: Failed to fetch from https://<MY_ID>@bitbucket.org/<MY_ID>/<MY_REPO_NAME>.git
hudson.plugins.git.GitException: Failed to fetch from https://<MY_ID>@bitbucket.org/<MY_ID>/<MY_REPO_NAME>.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
at hudson.model.Run.execute(Run.java:1678)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://<MY_ID>@bitbucket.org/<MY_ID>/<MY_REPO_NAME>.git +refs/heads/*:refs/remotes/<MY_ID>/*" returned status code 128:
stdout:
stderr: fatal: Authentication failed for 'https://<MY_ID>@bitbucket.org/<MY_ID>/<MY_REPO_NAME>.git/'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1098)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:984)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:68)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:217)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:223)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:610)
... 10 more
【问题讨论】: