Changing git build creds

35 views
Skip to first unread message

Larry Martell

unread,
Apr 22, 2016, 12:20:03 PM4/22/16
to Jenkins Users
I am a new user to Jenkins, so please bear with me. 

The employee who set up Jenkins quit and we removed his access to our github repo. But he had configured our automated build to access git as himself, so of course that is failing now. I went into the project settings and added a new credential for a user that does have access to our github repo, along with their github password. Now when the build runs I get this:

Permission denied (publickey).

What else do I have to do to switch the user that accesses our repo for builds? 

Thanks!

Indra Gunawan (ingunawa)

unread,
Apr 22, 2016, 1:35:08 PM4/22/16
to jenkins...@googlegroups.com
Don’t you need to upload the SSH public key of the build user to your github?

--
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/96ae7a96-6f75-4d94-a344-1dae736b44d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Larry Martell

unread,
Apr 22, 2016, 2:00:14 PM4/22/16
to jenkins...@googlegroups.com
I already did that. How can I see what it's getting "Permission denied" on?

Alex Domoradov

unread,
Apr 23, 2016, 9:23:32 AM4/23/16
to Jenkins Users
Have you tried to clone the repo from the console?

$ GIT_SSH_COMMAND="ssh -i ~/.ssh/new-github.key" git clone g...@github.com:user/project.git

Larry Martell

unread,
Apr 24, 2016, 3:47:15 PM4/24/16
to jenkins...@googlegroups.com
I was able to get this working using help I got on stackoverflow:

http://stackoverflow.com/questions/36802309/changing-github-credentials-for-jenkins
> --
> 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/381724e0-3338-451c-be20-76a8140277ed%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages