fetch git con los resultados del parámetro refspec en respuesta vacía

Tengo un problema al usar el plugin git con jenkins.

Jenkins: 1.617
git: 1.9.5.msysgit.1
Sistema operativo: server de Windows 2012

La salida de la console del trabajo jenkins es:

Building in workspace C:\Program Files (x86)\Jenkins\jobs\Test\workspace > git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git.exe config remote.origin.url ssh://git@localhost:22/projects/DW.git # timeout=10 Fetching upstream changes from ssh://git@localhost:22/projects/DW.git > git.exe --version # timeout=10 using GIT_SSH to set cnetworkingentials > git.exe -c core.askpass=true fetch --tags --progress ssh://git@localhost:22/projects/DW.git +refs/heads/*:refs/remotes/origin/* ERROR: Timeout after 10 minutes ERROR: Error fetching remote repo 'origin' 

Basado en la salida de la console Jenkins, verifiqué el comportamiento de git.exe en la console de Windows:

 C:\Program Files (x86)\Jenkins\jobs\Test\workspace>git.exe -c core.askpass=true fetch --tags --progress ssh://git@localhost:22/projects/DW.git +re fs/heads/*:refs/remotes/origin/* Enter passphrase for key '/.ssh/id_rsa': C:\Program Files (x86)\Jenkins\jobs\Test\workspace> 

Sin embargo, cuando el command se ejecuta en el terminal sin el parámetro refspec ( git fetch [<options>] [<repository> [<refspec>…]] ) git responde como se esperaba:

 C:\Program Files (x86)\Jenkins\jobs\Test\workspace>git.exe -c core.askpass=true fetch --tags --progress ssh://git@localhost:22/projects/DW.git Enter passphrase for key '/.ssh/id_rsa': From ssh://localhost:22/projects/DW * branch HEAD -> FETCH_HEAD 

Para verificar cómo responde otro repository, utilicé un repository de GitHub:

 C:\gittest>git.exe -c core.askpass=true fetch --tags --progress https://github. om/skeeto/sample-java-project.git +refs/heads/*:refs/remotes/origin/* remote: Counting objects: 423, done. rReceiving oemote: Total 423 (delta 0), reused 0 (delta 0), pabjects: 77% (326 Receiving obj Receiving objects: 100% (423/423), 64.84 KiB | 0 bytes/s, done. Resolving deltas: 100% (162/162), done. From https://github.com/skeeto/sample-java-project * [new branch] lwjgl -> origin/lwjgl * [new branch] lwjgl-cube -> origin/lwjgl-cube * [new branch] lwjgl-lib -> origin/lwjgl-lib * [new branch] master -> origin/master * [new branch] minimal -> origin/minimal * [new branch] noise -> origin/noise * [new branch] servlet -> origin/servlet 

Además, verifiqué el directory remoto con los siguientes commands:

 C:\Program Files (x86)\Jenkins\jobs\Test\workspace>git remote origin C:\Program Files (x86)\Jenkins\jobs\Test\workspace>git remote -v origin ssh://git@localhost:22/projects/DW.git (fetch) origin ssh://git@localhost:22/projects/DW.git (push) C:\Program Files (x86)\Jenkins\jobs\Test\workspace>git branch -r origin/master C:\Program Files (x86)\Jenkins\jobs\Test\workspace>git ls-remote Enter passphrase for key '/.ssh/id_rsa': From ssh://git@localhost:22/projects/DW.git a41ca12aa99d2764ff397e7b452ac1e6b2607735 HEAD a41ca12aa99d2764ff397e7b452ac1e6b2607735 refs/heads/master 

Encontré la solución:

parece ser un error en jenkins que se ha solucionado en el entorno Unix / Linux pero no en Windows: https://issues.jenkins-ci.org/browse/JENKINS-20879

Eliminé la frase de contraseña del id_rsa keyfile (en el directory /.ssh/ correcto)

 $ ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]