Unable to fetch origin - Workspace corruption?
See original GitHub issueHello, I’ve been trying to use this plugin to run jenkins on new pull requests, and initially I was successful. However, after a short period of time (fifteenish minutes), it would being crashing on new requests with this error:
Building in workspace /var/lib/jenkins/jobs/Libras Pull Requests/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url git@github.com:71lbs/libras.git # timeout=10
Fetching upstream changes from git@github.com:71lbs/libras.git
> git --version # timeout=10
using GIT_SSH to set credentials
> git fetch --tags --progress git@github.com:71lbs/libras.git refs/pull/*:refs/remotes/origin/pr/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from git@github.com:71lbs/libras.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
and etc...
The only way I was able to get it working again is by deleting the job’s workspace, and have it pull down a fresh clone. Is there any settings that I can use to get to always pull down a fresh clone, or is this some sort of error with the plugin?
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (2 by maintainers)
Top Results From Across the Web
Why is Jenkins failing when fetching from git, while the ...
This left the workspace on master in a corrupt state, and because Jenkins tries to use cached workspaces where it can, this caused...
Read more >Unable to connect to github.com with a git:// protocol URL
While fetching a repository from GitHub, Jenkins connection times out and I get a following error message.
Read more >Solution to the Git problem of loose object is corrupt
This post documents how we can fix the problem of loose object is corrupt in git. ... Then run git status , the...
Read more >Git error - Fatal: Not a git repository and how to fix it | Datree.io
A Git command needs to be run on a specific repository, so this error typically occurs when a Git command is run in...
Read more >Common Issues with GitKraken Client | Integration Error ...
Clear your browser cache, sign out of the git hosting service, then restart GitKraken Client and try again. If that is not working...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@MasterSlowPoke
I had exactly the same stack trace with this error message: “ERROR: Error fetching remote repo ‘origin’” I was getting it as soon as my repository in GitHub was set to private. Everything was configured correctly in Jenkins and Github.
I searched for days and surprisingly, this worked, no Jenkins restart is even required: https://stackoverflow.com/a/37753202/5484068
#I was on Windows Server 2012 R2, open a CMD in your Jenkins installation as an Admin, and run this:
git config --global --unset credential.helper
git config --system --unset credential.helper
Was having the exact same problem and the above did not work.
Solution for me was to clear the workspace dir @
/var/lib/jenkins/workspace/*