nayak_namratha
nayak_namratha

Reputation: 31

"hudson.plugins.git.GitException" error, failed to fetch from git

I am trying to pull the changes from the Git and generate the build. But every time it gives the following error. I have tried all most all the solutions provided in stack overflow. But it didn't work. My disk space is also fine. Please help me to resolve this issue.

  [EnvInject] - Loading node environment variables.
    Building in workspace /Users/Shared/Jenkins/Home/workspace/Proj_name
     > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
    Fetching changes from 2 remote Git repositories
     > /usr/bin/git config remote.origin.url 
    "URL of the git repo" # timeout=10
    Fetching upstream changes from "URL of the git repo"
     > /usr/bin/git --version # timeout=10
    using GIT_ASKPASS to set credentials 
     > /usr/bin/git fetch --tags --progress 
    "URL of the git repo"
    +refs/heads/*:refs/remotes/origin/*
    ERROR: Timeout after 10 minutes
    ERROR: Error fetching remote repo 'origin'
    hudson.plugins.git.GitException: Failed to fetch from 
    "URL of the git repo"
        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 "/usr/bin/git fetch --tags --progress "URL of the git repo"
+refs/heads/*:refs/remotes/origin/*" returned status code 143:
stdout: 
stderr: error: git-credential-osxkeychain died of signal 15

    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'
Build did not succeed and the project is configured to only push after a successful build, so no pushing will occur.

Upvotes: 2

Views: 8824

Answers (1)

Et Ld
Et Ld

Reputation: 1

In my case I had to clean all my setup (I got an external windows agent running with winSW)

  • remove the workspaces corresponding to your branch (+ the temp folder)
  • remove the logs file for winSW (if you are using winSW)
  • uninstall reinstall the winSW agent (relaunch the jenkins agent / java)
  • ensure that all steps as been executed as admin

after the cleaning it was working fine.

Upvotes: 0

Related Questions