I was able to get this working using help I got on stackoverflow:

http://stackoverflow.com/questions/36802309/changing-github-credentials-for-jenkins

On Sat, Apr 23, 2016 at 9:23 AM, Alex Domoradov <[email protected]> wrote:
> Have you tried to clone the repo from the console?
>
> $ GIT_SSH_COMMAND="ssh -i ~/.ssh/new-github.key" git clone
> [email protected]:user/project.git
>
>
>
> On Friday, April 22, 2016 at 9:00:14 PM UTC+3, Larry Martell wrote:
>>
>> I already did that. How can I see what it's getting "Permission denied"
>> on?
>>
>> On Fri, Apr 22, 2016 at 1:34 PM, Indra Gunawan (ingunawa)
>> <[email protected]> wrote:
>> > Don’t you need to upload the SSH public key of the build user to your
>> > github?
>> >
>> > From: <[email protected]> on behalf of Larry Martell
>> > <[email protected]>
>> > Reply-To: "[email protected]"
>> > <[email protected]>
>> > Date: Friday, April 22, 2016 at 9:20 AM
>> > To: "[email protected]" <[email protected]>
>> > Subject: Changing git build creds
>> >
>> > 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!
>
> --
> 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/381724e0-3338-451c-be20-76a8140277ed%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CACwCsY6Tjy4Z7kJEGQxdz6G2ueHNTJA-UtEZqs4hRRLrUbn2Sw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to