Git authentication issue on slave

22 views
Skip to first unread message

Robert Daniels

unread,
Mar 3, 2015, 10:51:06 AM3/3/15
to jenkins...@googlegroups.com
We have a private enterprise github system and we use ssh keys for authentication.

I'm running a linux slave, logging in from Jenkins as the same user as I would directly on the slave VM. However, git commands are coming back with an error in the script:

+ git pull
Permission denied (publickey).

If I perform a git clone and place the username and password on the command line it works - but do not want to place clear text passwords into the scripts.

When I run the test Groovy script console and execute a "whoami", it comes back with the correct user.

Everything behaves correctly when entering directly in a terminal on the test/slave VM.

Any ideas?

Mark Waite

unread,
Mar 3, 2015, 5:18:29 PM3/3/15
to jenkins...@googlegroups.com
The credentials plugin will allow you to register an ssh private key for a user. Then you can configure the Jenkins job to use that credential when cloning the repository.

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/c493b535-3261-4c2f-9188-2aac751d6eae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks!
Mark Waite
Reply all
Reply to author
Forward
0 new messages