I'm getting the below error ERROR: Error fetching remote repo 'origin' when building a Jenkins job and Build gets failed. But previously this Jenkins job used to work properly and after sometime when I tried to build the same job without changing any configurations I have received that error.
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from <repo url>
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:1001)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1242)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1302)
at hudson.scm.SCM.checkout(SCM.java:540)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1240)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:649)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:521)
at hudson.model.Run.execute(Run.java:1900)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --force --progress -- <repo url> +refs/heads/*:refs/remotes/origin/*" returned status code 128:
So I think this might be an authentication problem. So my question is how to resolve this?
I have tried updating the personal access token, using an account with full access to the repo but still got the error.