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 On Tue, Mar 3, 2015 at 8:51 AM, Robert Daniels <[email protected]> wrote: > 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? > > -- > 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/c493b535-3261-4c2f-9188-2aac751d6eae%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/c493b535-3261-4c2f-9188-2aac751d6eae%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Thanks! 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHS7HJE3Dx3HXbSkVRAZjQuA09gTMqSzEy6UhZn1YEhLg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
