-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
Jenkins 1.598
Linux 2.6.32-431.5.1.el6.x86_64
CentOS release 6.5 (Final)
Plugins:
Attached file saved from pluginManager/api/xml?tree=plugins[shortName,version]&pretty
I have a private key set up in the global credentials (named sls). I have the SCM for a test project set up to download code from a springloops git project. See attached log of the failure to connect to git.
Fetching the repo with command line git works fine with the same key. If I install an SSH agent on the exact same build, it allows the fetch to work. See the other attached log for that.
I have used jenkins and git in a different environment with no problems. The only difference I've noticed here is the non-standard port of 1234. Is it possible git plugin is not identifying the port?
Setting the priority to major since use of SSH agent is a workaround but requires extra configuration and build overhead.
- duplicates
-
JENKINS-20879 SSH Credentials (private key with passphrase) do not work
-
- Closed
-
- is duplicated by
-
JENKINS-20638 SSH key credential doesn't work with key passphrase
-
- Closed
-
The git plugin definitely supports a non-standard port as part of the ssh protocol specification. I regularly test that ssh://mwaite@wheezy64b:45022/var/lib/git/mwaite/bin.git (an ssh protected private repo on my machine named "wheezy64b") can be retrieved with the git client plugin automated tests.
If the ssh agent allows you to fetch, then it may be that you have an ssh passphrase configured on that ssh key. I believe that if a passphrase is configured on the ssh key, then the only way to make the git client use that passphrase is through the ssh agent.
You might also try the "Advanced" button in the credentials plugin to see if it will allow you to enter the passphrase, but my recollection is that didn't allow the plugin to use the passphrase.