Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39556

Git version 2.10.2.windows.1 error code 128 on git fetch command

    Details

    • Similar Issues:

      Description

      given:
      Windows Server 2012 and Windows Server 2008
      git for windows version 2.10.2.windows.1

      when:
      Jenkins runs git fetch command

      then:
      error fetching remote repo message is received.
      This only happens intermittently, approximately once in every 25 job runs.

      Redacted Stack Trace:

      Building remotely on [MACHINE_NAME] (build) in workspace c:\workspace\location
       > C:\location\of\git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > C:\location\of\git\bin\git.exe config remote.origin.url git@git.<gitlab-server>:My/project.git # timeout=10
      Fetching upstream changes from git@git.<gitlab-server>:My/project.git
       > C:\location\of\git\bin\git.exe --version # timeout=10
      using GIT_SSH to set credentials 
       > C:\location\of\git\bin\git.exe fetch --tags --progress git@git.<gitlab-server>:My/project.git +refs/heads/*:refs/remotes/origin/*
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from git@git.<gitlab-server>:My/project.git
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:797)
          ...
          at hudson.model.Executor.run(Executor.java:404)
      Caused by: hudson.plugins.git.GitException: Command "C:\location\of\git\bin\git.exe fetch --tags --progress git@git.<gitlab-server>:My/project.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
      stdout: 
      stderr: ssh_exchange_identification: Connection closed by remote host
      fatal: Could not read from remote repository.
      
      Please make sure you have the correct access rights
      and the repository exists.
      
          at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1752)
          ...
          at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:795)
          ... 11 more
      ERROR: null
      Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
      Finished: FAILURE
      

      Research:

      1. Modified Jenkins to read ssh private key from specific file on the machine Jenkins runs on - Error still observed intermittently
      2. Copy and pasted ssh private key directly into Jenkins (in case of a file access permission issue with 1.) - Error still observed intermittently
      3. Git command run as a scheduled job on the windows machines on which Jenkins runs (attempt to eliminate Jenkins as the source of the issue) - This was run hourly over a weekend. No errors were observed which points to this being a Jenkins issue, hence this Iira ticket.

        Attachments

          Issue Links

            Activity

            Hide
            shannoncode Stuart Shannon added a comment -

            Very similar to this issue, however in this case Jenkins is running on Windows rather than Linux.

            Show
            shannoncode Stuart Shannon added a comment - Very similar to this issue, however in this case Jenkins is running on Windows rather than Linux.
            Hide
            shannoncode Stuart Shannon added a comment -

            Similar to this issue, however the suggested fixes did not work in this case.

            Show
            shannoncode Stuart Shannon added a comment - Similar to this issue, however the suggested fixes did not work in this case.
            Hide
            markewaite Mark Waite added a comment -

            Command line git is reporting that it cannot read from the remote repository because the server side closed the connection. That is not something the Jenkins git plugin can resolve. It might be a load issue on your git server. It might be a network communications issue between the machine hosting the Jenkins agent and the server.

            I suspect you'll see intermittent behavior if you run git clone or git fetch from a command line frequently enough.

            Show
            markewaite Mark Waite added a comment - Command line git is reporting that it cannot read from the remote repository because the server side closed the connection. That is not something the Jenkins git plugin can resolve. It might be a load issue on your git server. It might be a network communications issue between the machine hosting the Jenkins agent and the server. I suspect you'll see intermittent behavior if you run git clone or git fetch from a command line frequently enough.

              People

              • Assignee:
                markewaite Mark Waite
                Reporter:
                shannoncode Stuart Shannon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: