Windows Server 2012 and Windows Server 2008
git for windows version 2.10.2.windows.1
Jenkins runs git fetch command
error fetching remote repo message is received.
This only happens intermittently, approximately once in every 25 job runs.
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
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:
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.
... 11 more
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
- Modified Jenkins to read ssh private key from specific file on the machine Jenkins runs on - Error still observed intermittently
- Copy and pasted ssh private key directly into Jenkins (in case of a file access permission issue with 1.) - Error still observed intermittently
- 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.