我在 jenkins 中有一个多分支管道,当我设置它时,我通过点击红叉图标取消了 gitlab 分支作业的初始扫描。
从那时起,我就无法让它正常工作了。
我已将错误粘贴在下面。
这是我尝试解决的问题。
我已经没有想法了
就好像在 jenkins 端缓存了这个特定 git 存储库的某些内容。
有人对我可以尝试的事情有任何进一步的建议吗?
提前致谢
Started by user admin
[Mon May 20 15:38:34 UTC 2019] Starting branch indexing...
> git --version # timeout=10
using GIT_ASKPASS to set credentials git
> git ls-remote --symref # timeout=10
> git rev-parse --is-inside-work-tree # timeout=10
Setting origin to http://myserver/project.git
> git config remote.origin.url http://myserver/project.git # timeout=10
ERROR: [Mon May 20 15:38:37 UTC 2019] Could not fetch branches from source 773e986b-d653-49c8-b3eb-7320be14e5aa
hudson.plugins.git.GitException: Command "git config remote.origin.url http://myserver/project.git" returned status code 255:
stdout:
stderr: error: could not lock config file .git/config: File exists
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2010)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2006)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1638)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1650)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.setRemoteUrl(CliGitAPIImpl.java:1284)
at hudson.plugins.git.GitAPI.setRemoteUrl(GitAPI.java:160)
at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:556)
at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:374)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:284)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1025)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
[Mon May 20 15:38:37 UTC 2019] Finished branch indexing. Indexing took 2.4 sec
FATAL: Failed to recompute children of Foldername » MultiBranchPipeline
hudson.plugins.git.GitException: Command "git config remote.origin.url http://myserver/project.git” returned status code 255:
stdout:
stderr: error: could not lock config file .git/config: File exists
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2010)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2006)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1638)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1650)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.setRemoteUrl(CliGitAPIImpl.java:1284)
at hudson.plugins.git.GitAPI.setRemoteUrl(GitAPI.java:160)
at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:352)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:556)
at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:374)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:284)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1025)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
有同样的问题: