【发布时间】:2021-12-19 07:51:56
【问题描述】:
我正在使用 azure devops,
尝试在 jenkins 中运行构建时出现以下错误:
hudson.plugins.git.GitException: Command "git.exe fetch --tags --force --progress -- https://xxxx.com/_git/xxxx +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: fatal: Cannot prompt because user interactivity has been disabled.
fatal: unable to access 'https://xxxx/_git/xxxx/': The requested URL returned error: 403
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2681)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2102)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:86)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:624)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:853)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1224)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1302)
at hudson.scm.SCM.checkout(SCM.java:505)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1213)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:637)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:509)
at hudson.model.Run.execute(Run.java:1888)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:99)
at hudson.model.Executor.run(Executor.java:431)
ERROR: Error cloning remote repo 'origin'
如果我在 jenkins 中检查我的项目 - 配置:
*用户拥有所有必需的权限。
*在詹金斯工作中我使用用户名和密码方法,而在密码中我使用用户个人访问令牌。
【问题讨论】:
标签: git jenkins azure-devops jenkins-pipeline jenkins-plugins