Jenkins Git Plugin Error

825 views
Skip to first unread message

Paulo Moreira

unread,
Feb 6, 2016, 6:07:52 PM2/6/16
to Jenkins Users

Paulo Moreira
to mark.earl.waite, nicolas.deloof
1 day agoDetails
Dear Jenkins Masters,

Sorry to bother you but I am strugguling to get the git plugin working under my environment.

Can you please help?
I am working on this issue for some days now :(

Here is my setting:

Master:
Jenkins Master under Linux CentOS
- git clone by shell --> Ok
- git plugin --> Ok

Node:
Under Windows 7
- git clone by shell --> Ok
- git plugin --> NOK (and here is my problem)


Cloning repository ssh://g...@gitlab.XXX.git
> git init D:\workspace\test_git_newgitlab_win # timeout=10
Fetching upstream changes from ssh://g...@gitlab.XXX.git
> git --version # timeout=10
using GIT_SSH to set credentials
> git -c core.askpass=true fetch --tags --progress ssh://g...@gitlab.XXX.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress ssh://g...@gitlab.XXX.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: plink: unknown option "-o"
plink: unknown option "-p"
fatal: Could not read from remote repository.

GIT_HOME=D:\Programs\Git\cmd
HOME=C:\Users\paulomoreira
PATH=D:\Programs\TortoiseSVN\bin;D:\Programs\PuTTY;D:\Programs\PuTTY;D:\Programs\TortoiseGit\bin;D:\Programs\Git\cmd;D:\Programs\Git\bin

Jenkins:V 1.639
Git Client plugin: 1.19.2
Git plugin: 2.4.2


I have run out off solutions :(

Mark Waite

unread,
Feb 6, 2016, 6:12:55 PM2/6/16
to Jenkins Users

The error message hints that you have chosen to install git for Windows to use plink rather than the default openssh authentication system.  The simplest solution is probably to reconfigure your git for Windows to use openssh rather than plink.

If you must use plink, you may find helpful instructions on the wiki page of the git plugin.

Mark Waite


--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2d903c70-08ff-4cd3-81a4-4bcdf446cd27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paulo Moreira

unread,
Feb 8, 2016, 12:42:21 PM2/8/16
to Jenkins Users
Hi Mark,

Thank you for the anwser.

Ok so I installed git with default openssh but now I get:
status code 128:
stdout: 
stderr: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.

How can I add my keys for auto git clone without plink.exe?

Thanks

Mark Waite

unread,
Feb 8, 2016, 12:49:39 PM2/8/16
to Jenkins Users
You use the Jenkins credentials system to register a credential with the user name and private key file, then reference that credential from the job definition.

Credentials are defined through "Jenkins" -> "Credentials".  You can then choose to create credentials which are accessible to all jobs, or credentials which are only accessible to jobs whose SCM is using a specific SCM URL (like git://github.com or g...@bitbucket.org or https://gitlab.com/ or https://assembla.com/ ), or a specific SCM protocol (like https or ssh or git).

Refer to https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Plugin for more information on credentials.

Mark Waite

Paulo Moreira

unread,
Feb 9, 2016, 12:14:17 PM2/9/16
to Jenkins Users
Thank You Marc ;)

Finally got it running!

So I installed git with OpenSSH and created credentials.

I owe you a beer, and a BIG one!

Cheers,
Paulo M.
Reply all
Reply to author
Forward
0 new messages