早上好,我在jenkins中构建管道时遇到问题,有时有些作业返回身份验证错误,有时它们正在工作。
这是Jenkins版本2.164.2,git插件版本3.11和git client插件是2.8.0 由上游项目“ PIPELINE_OI”内部版本号35开始 最初是由于:
Started by user Administrador Jenkins OI
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/workspace/TRUNK/AUDITORIA J14/poi-auditoria-commons-j14
using credential dbebfd81-9cc5-4693-ad12-5b7f0e7dc845
Cloning the remote Git repository
Cloning repository https://innersource.accenture.com/scm/pmoi/auditoria-vj14_poi-auditoria-commons-j14.git
> git init /var/lib/jenkins/workspace/TRUNK/AUDITORIA J14/poi-auditoria-commons-j14 # timeout=10
Fetching upstream changes from https://innersource.accenture.com/scm/pmoi/auditoria-vj14_poi-auditoria-commons-j14.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://innersource.accenture.com/scm/pmoi/auditoria-vj14_poi-auditoria-commons-j14.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --progress https://innersource.accenture.com/scm/pmoi/auditoria-vj14_poi-auditoria-
commons-j14.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: fatal: Authentication failed for 'https://innersource.accenture.com/scm/pmoi/auditoria-vj14_poi-auditoria-commons-j14.git/'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:655)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
at hudson.scm.SCM.checkout(SCM.java:504)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1816)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
ERROR: Error cloning remote repo 'origin'
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] done
Finished: FAILURE
有时通过,有时返回此身份验证错误。
答案 0 :(得分:1)
通过ssh将带有身份验证的https呼叫类型更改为公钥
答案 1 :(得分:0)
就我而言,我必须禁用默认Windows Git安装随附的凭据帮助程序:
$ git config --system --unset credential.helper
在这种情况下,詹金斯(Jenkins)控制了Git身份验证。
参考here