Thanks Mark!  I believe I'm one step closer but it's still not working.  
I'm now getting:

Caused by: hudson.plugins.git.GitException: Command "git fetch --tags 
--progress git@myURLRepo:myUser/myProject.git 
+refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: 
stderr: ssh: connect to host myURLRepo port 22: Connection timed out fatal: 
Could not read from remote repository. Please make sure you have the 
correct access rights and the repository exists.



On Monday, March 29, 2021 at 11:23:28 AM UTC-6 Mark Waite wrote:

> You can't use ssh authentication with an https repository URL.  When using 
> ssh authentication, you need to use an ssh repository URL.  When using 
> username / password or username / token, you must use an HTTPS (or HTTP) 
> URL.
>
> Mark Waite
>
> On Mon, Mar 29, 2021 at 10:38 AM Eric Fetzer <eric....@gmail.com> wrote:
>
>> Hmmm, thought that was going to work but it didn't.  I followed 
>> everything to a T at:  
>> https://mohitgoyal.co/2017/02/27/configuring-ssh-authentication-between-github-and-jenkins/
>> The output shows:
>>
>> Building on master in workspace /var/lib/jenkins/workspace/Git-Checkout
>> using credential JenkinsSSHKey
>>  > git rev-parse --is-inside-work-tree # timeout=10
>> Fetching changes from the remote Git repository
>>  > git config remote.origin.url https://m 
>> <https://code.fs.usda.gov/ericfetzer/iNAP.git>yGitRepo.git # timeout=10
>> Cleaning workspace
>>  > git rev-parse --verify HEAD # timeout=10
>> No valid HEAD. Skipping the resetting
>>  > git clean -fdx # timeout=10
>> Fetching upstream changes from https://m 
>> <https://code.fs.usda.gov/ericfetzer/iNAP.git>yGitRepo.git
>>  > git --version # timeout=10
>> using GIT_SSH to set credentials 
>>
>>
>> So I see it's using the creds.  Then when it tries to do the fetch, it 
>> says:
>>
>>  > git fetch --tags --progress https://m 
>> <https://code.fs.usda.gov/ericfetzer/iNAP.git>yGitRepo.git 
>> +refs/heads/*:refs/remotes/origin/* # timeout=10
>> ERROR: Error fetching remote repo 'origin'
>> hudson.plugins.git.GitException: Failed to fetch from https://m 
>> <https://code.fs.usda.gov/ericfetzer/iNAP.git>yGitRepo.git
>>      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:909)
>>      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1131)
>>      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1167)
>>      at hudson.scm.SCM.checkout(SCM.java:505)
>>      at hudson.model.AbstractProject.checkout(AbstractProject.java:1206)
>>      at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:637)
>>      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
>>      at 
>> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:509)
>>      at hudson.model.Run.execute(Run.java:1907)
>>      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
>>      at hudson.model.ResourceController.execute(ResourceController.java:97)
>>      at hudson.model.Executor.run(Executor.java:429)
>> Caused by: hudson.plugins.git.GitException: Command "git fetch --tags 
>> --progress https://m 
>> <https://code.fs.usda.gov/ericfetzer/iNAP.git>yGitRepo.git 
>> +refs/heads/*:refs/remotes/origin/*" returned status code 128:
>> stdout: 
>> stderr: remote: Password authentication is not available for Git operations.
>> remote: You must use a personal access token or SSH key.
>>
>>
>>
>> On Mon, Mar 29, 2021 at 8:09 AM Eric Fetzer <eric....@gmail.com> wrote:
>>
>>> Ohhhh, duh, I get it now.  I create the key with the jenkins user and 
>>> add id_rsa.pub to the GitHub account for access.  I was somehow thinking I 
>>> would need a key on the GitHub side.  Feeling kind of foolish now, lol.  
>>> Thanks Dirk!
>>>
>>> On Mon, Mar 29, 2021 at 7:52 AM 'Dirk Heinrichs' via Jenkins Users <
>>> jenkins...@googlegroups.com> wrote:
>>>
>>>> Am Montag, den 29.03.2021, 07:44 -0600 schrieb Eric Fetzer:
>>>>
>>>> Thanks for your reply Dirk!  I'm a unix guy and that would have been my 
>>>> first choice, however I don't have access to the GitHub OS, only my 
>>>> particular repositories.
>>>>
>>>>
>>>> I don't understand. Nobody has this kind of access. But everybody can 
>>>> add SSH keys to their GH account (using the web UI).
>>>>
>>>> Bye...
>>>>
>>>> Dirk
>>>>
>>>> -- 
>>>>
>>>> *Dirk Heinrichs*
>>>> Senior Systems Engineer, Delivery Pipeline
>>>> OpenText ™ Discovery | Recommind
>>>> *Phone*: +49 2226 15966 18 <+49%202226%201596618>
>>>> *Email*: dhei...@opentext.com
>>>> *Website*: www.recommind.de
>>>> Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
>>>> Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu 
>>>> Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, 
>>>> Registernummer HRB 10646
>>>> This e-mail may contain confidential and/or privileged information. If 
>>>> you are not the intended recipient (or have received this e-mail in error) 
>>>> please notify the sender immediately and destroy this e-mail. Any 
>>>> unauthorized copying, disclosure or distribution of the material in this 
>>>> e-mail is strictly forbidden
>>>> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte 
>>>> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
>>>> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
>>>> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
>>>> Weitergabe dieser Mail sind nicht gestattet.
>>>>
>>>> -- 
>>>> 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/Ob42FqU-0UY/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/7363fbe30406b54bee9b6671dc9754cbf78081c7.camel%40opentext.com
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/7363fbe30406b54bee9b6671dc9754cbf78081c7.camel%40opentext.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>>
> 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/CAByBicb7irzVcbgHO0vV39EE7f515%3DVCkcHqrYE5eefkjbZT%3Dg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAByBicb7irzVcbgHO0vV39EE7f515%3DVCkcHqrYE5eefkjbZT%3Dg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/d18ca0d2-ee3e-44b5-b6b4-7646e9489b56n%40googlegroups.com.

Reply via email to