Am 28.09.2017 um 16:54 schrieb Andreas Tscharner: > Hello World, > > I have the following setup: > > git Server: Debian Linux 9.1 > Jenkins master: Debian Linux 9.1 > Jenkins agent: Windows 7 > > I created a user on the git server for building, it is called "build". > I also have created a ssh key-pair for that user. The public key is in > the authorized_keys file on the git server. I have installed PuTTY on > the Windows agent, and I autostart Pageant with the key for the user > "build". git v2.14.2 is installed on Windows as well and GIT_SSH > contains the full path to PuTTY plink.exe. If I use PuTTY to log in to > the git server, it works without a problem (and without a password as > well as Pageant serves the key). > > I now wanted to use this setup with Jenkins and it always fails. If I > enter the git commands it shows on the console output on a cmd.exe it > works, but it does not work with Jenkins. > > I tried with the credentials username/password, I get: > Cloning repository ssh://git.metromec.ch/repositories/quartis.git > > git init C:\Jenkins-Jobs\workspace\Branch-origin-features-QT-7889 # > timeout=10 > Fetching upstream changes from > ssh://git.metromec.ch/repositories/quartis.git > > git --version # timeout=10 > using GIT_ASKPASS to set credentials Build user from the VMs > > git fetch --tags --progress > ssh://git.metromec.ch/repositories/quartis.git > +refs/heads/*:refs/remotes/origin/* > ERROR: Error cloning remote repo 'origin' > hudson.plugins.git.GitException: Command "git fetch --tags --progress > ssh://git.metromec.ch/repositories/quartis.git > +refs/heads/*:refs/remotes/origin/*" returned status code 128: > stdout: > stderr: fatal: protocol error: bad line length character: logi
This looks to me as if you were trying to run the git commands from an "Execute Windows Batch" step in your Jenkins job. It's far easier to simply use the Git plugin to do the job together with the SSH key you provided to Jenkins via "Manage Jenkins" -> "Credentials". This can also be configured to use JGit so that you don't even need GfW installed. HTH... Dirk -- *Dirk Heinrichs* Senior Systems Engineer, Delivery Pipeline OpenText^TM Discovery | Recommind *Email*: [email protected] <mailto:[email protected]> *Website*: www.recommind.de <http://www.recommind.de> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB 10646 This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0a30b0ba-ce0e-43e1-b1ef-9492f36ebb71%40opentext.com. For more options, visit https://groups.google.com/d/optout.
