Authenticate with Global Credential from Remote Server

24 views
Skip to first unread message

Eric Fetzer

unread,
Oct 2, 2015, 4:04:21 PM10/2/15
to Jenkins Users
I added a user in Global Credentials:

  • Global User
  • username = apache
  • Private key = Enter Directly (I added this from cat ~/.ssh/id_rsa.pub for the user running the build from other server - username is apache on other server but I don't think that matters)

When I attempt to build, I get:  Authentication failed. No private key accepted.  Note that my passphrase is blank but when I go back in it looks like there's a passphrase entered in there.  Here's an example of my command line entry:

java -jar jenkins-cli.jar -s http://nd100bd001:8080/ -i /home/apache/.ssh/id_rsa who-am-I

This works successfully when I do it as my user and I have my user's id_rsa.pub in my own configuration.  Any help?

Thanks,
Eric

James Nord

unread,
Oct 3, 2015, 5:07:03 AM10/3/15
to Jenkins Users
Credentials are for jenkins to use to access systems, not for you to access jenkins.
To set an shh key for cli auth you need to set they key on the user in <jenkinsurl>/user/<username>.

Gmail Account

unread,
Oct 3, 2015, 8:57:19 AM10/3/15
to jenkins...@googlegroups.com
Ok, gotcha, thus it asking for private key. I should have gotten that. That's easy enough, but I don't want to use an Active Directory user and I'm integrated. Is there a way to also set a generic build user along with the AD integration?

> On Oct 3, 2015, at 5:07 AM, James Nord <james...@gmail.com> wrote:
>
> Credentials are for jenkins to use to access systems, not for you to access jenkins.
> To set an shh key for cli auth you need to set they key on the user in <jenkinsurl>/user/<username>.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/OCJp_1kEW8U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5e276eb7-f321-4d2c-aad1-4ca4c4781fdd%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

James Nord

unread,
Oct 3, 2015, 3:55:14 PM10/3/15
to Jenkins Users
No. The normal approach would be for your AD admin to create a (limited) service account.
Reply all
Reply to author
Forward
0 new messages