【发布时间】:2019-06-28 22:13:07
【问题描述】:
您好,当我尝试在 Jenkins 中构建项目时遇到此错误。
Started by user jenkins
Building in workspace /var/lib/jenkins/workspace/booking-widget-api
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://xxx@bitbucket.org/yyy/repo-name.git # timeout=10
Fetching upstream changes from https://xxx@bitbucket.org/yyy/repo-name.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --tags --progress https://xxx@bitbucket.org/yyy/repo-name.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://xxx@bitbucket.org/yyy/repo-name.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:888)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1155)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
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:1794)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://xxx@bitbucket.org/yyy/repo-name.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: remote: Counting objects: 8, done.
remote: Compressing objects: 12% (1/8)
remote: Compressing objects: 25% (2/8)
remote: Compressing objects: 37% (3/8)
remote: Compressing objects: 50% (4/8)
remote: Compressing objects: 62% (5/8)
remote: Compressing objects: 75% (6/8)
remote: Compressing objects: 87% (7/8)
remote: Compressing objects: 100% (8/8)
remote: Compressing objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 0 (delta 0)
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2002)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1721)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:886)
... 11 more
ERROR: Error fetching remote repo 'origin'
Finished: FAILURE
我第一次收到此错误。我只是放弃了一段时间(一天)。然后我构建了项目,它正常工作并成功构建。现在我又收到了这个错误。有没有人面临这种问题?
【问题讨论】:
-
磁盘空间不足可能是原因。还要尝试始终擦除工作区并在每次构建时克隆一个新的存储库。
标签: git jenkins jenkins-pipeline