Aha! I must have gotten something wrong in the rest of the steps, because
using a fresh new key I was able to get this working. Sorry for the dumb
user error, and thanks for the help!

Jack

On Wed, Dec 21, 2016 at 4:34 PM, Jack Brooks <[email protected]> wrote:

> Hi Indra,
>
> To be clear, when you say, "Have you added the SSH public key of the user
> used for cloning the github repo on Jenkins node/agent using git plugin?"
> do you mean adding the public key of the github user to ~/.ssh on the agent
> as a discrete file, or in authorized_users? Sorry, I'm not certain what
> we're talking about here.
>
> Thanks!
> Jack
>
> On Tue, Dec 20, 2016 at 4:14 PM, Indra Gunawan (ingunawa) <
> [email protected]> wrote:
>
>> Have you added the SSH public key of the user used for cloning the github
>> repo on Jenkins node/agent using git plugin?
>>
>> Have you created the Jenkins Credential using SSH private key for the
>> user on Jenkins?  Have you set the git plugin’s Credential drop-down item
>> to this new credential that you added to Jenkins?
>>
>>
>>
>> *From: *<[email protected]> on behalf of "
>> [email protected]" <[email protected]>
>> *Reply-To: *"[email protected]" <
>> [email protected]>
>> *Date: *Tuesday, December 20, 2016 at 12:52 PM
>> *To: *Jenkins Users <[email protected]>
>> *Subject: *Git Plugin doesn't pull from repo .git url
>>
>>
>>
>> Hi all,
>>
>>
>>
>> I'm running an issue when I try to use the repository URL (the one used
>> for `git clone`) of a private project in the Repository URL field:
>>
>>
>>
>> > git rev-parse --is-inside-work-tree # timeout=10
>>
>> Fetching changes from the remote Git repository
>>
>>  > git config remote.origin.url [email protected]:foo/bar.git # timeout=10
>>
>> Fetching upstream changes from [email protected]:foo/bar.git
>>
>>  > git --version # timeout=10
>>
>> using GIT_ASKPASS to set credentials
>>
>>  > git fetch --tags --progress [email protected]:foo/bar.git 
>> +refs/heads/*:refs/remotes/origin/*
>>
>> ERROR: Error fetching remote repo 'origin'
>>
>> hudson.plugins.git.GitException 
>> <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>:
>>  Failed to fetch from [email protected]:foo/bar.git
>>
>>         at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:803) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.GitSCM.fetchFrom&entity=method>
>>
>>         at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1063) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.GitSCM.retrieveChanges&entity=method>
>>
>>         at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1094) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.plugins.git.GitSCM.checkout&entity=method>
>>
>>         at hudson.scm.SCM.checkout(SCM.java:495) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.scm.SCM.checkout&entity=method>
>>
>>         at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractProject.checkout&entity=method>
>>
>>         at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
>>  
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout&entity=method>
>>
>>         at 
>> jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
>> <http://stacktrace.jenkins-ci.org/search/?query=jenkins.scm.SCMCheckoutStrategy.checkout&entity=method>
>>
>>         at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
>>  
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.run&entity=method>
>>
>>         at hudson.model.Run.execute(Run.java:1720) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method>
>>
>>         at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyleBuild.run&entity=method>
>>
>>         at 
>> hudson.model.ResourceController.execute(ResourceController.java:98) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method>
>>
>>         at hudson.model.Executor.run(Executor.java:404) 
>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method>
>>
>> Caused by: hudson.plugins.git.GitException 
>> <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>:
>>  Command "git fetch --tags --progress [email protected]:foo/bar.git 
>> +refs/heads/*:refs/remotes/origin/*" returned status code 128:
>>
>> stdout:
>>
>> stderr: Permission denied (publickey).
>>
>> fatal: Could not read from remote repository.
>>
>>
>>
>> If I use the project URL- that is, https://github.com/foo/bar- it's able to 
>> see it just fine. Is this a documentation issue, or am I supposed to be 
>> using the *.git repo? If so, what am I doing wrong above? I know I've got my 
>> credentials set up correctly.
>>
>>
>>
>> Versions:
>>
>> Jenkins ver. 2.19.4
>>
>> Git Plugin: 3.0.1
>>
>>
>>
>> Thanks!
>>
>> Jack
>>
>> --
>> 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/ms
>> gid/jenkinsci-users/c56bf7af-f20d-4e41-9c40-2b950ea6fafa%
>> 40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/c56bf7af-f20d-4e41-9c40-2b950ea6fafa%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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/to
>> pic/jenkinsci-users/Yvnxcyida-g/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/jenkinsci-users/092F8E05-9071-414B-A5AA-E9BF5A0BBB9A%40cisco.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/092F8E05-9071-414B-A5AA-E9BF5A0BBB9A%40cisco.com?utm_medium=email&utm_source=footer>
>> .
>>
>> 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/CAAk78BSiyGUx7humKPvwyEsCk5Vd7aXqLUqp_iUK2FL74dN8aw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to