Re: GitHub Clone to Different Local Directory

2021-03-31 Thread 'Dirk Heinrichs' via Jenkins Users
Am Mittwoch, den 31.03.2021, 08:17 -0600 schrieb Eric Fetzer:

> Hi Dirk, sorry I didn't respond earlier, but I did try these things. 
> They just didn't work.  Questioning whether I didn't run into a
> firewall rule.  Even though they allow us to add an SSH Key in
> GitHub, that doesn't mean they've opened port 22 on the server.  When
> I try to ssh g...@github.com, it ends up "Connection timed out".  I
> would kind of expect a refusal if the firewall were slapping it down,
> but not sure.

Nope. This is exactly what you see if it's blocked by FW. If you could
reach github.com with SSH (on port 22), but they didn't have the port
open (no daemon listening), you'd get a "Connection refused" right
away.

Bye...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhein...@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 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/ec9bd6553d4e17a0bf6d9863da02e44ef6390ce8.camel%40opentext.com.


signature.asc
Description: This is a digitally signed message part


Re: GitHub Clone to Different Local Directory

2021-03-31 Thread Eric Fetzer
Hi Dirk, sorry I didn't respond earlier, but I did try these things.  They
just didn't work.  Questioning whether I didn't run into a firewall rule.
Even though they allow us to add an SSH Key in GitHub, that doesn't mean
they've opened port 22 on the server.  When I try to ssh g...@github.com, it
ends up "Connection timed out".  I would kind of expect a refusal if the
firewall were slapping it down, but not sure.  I've also turned
strictHostKeyChecking off and that also produced failure from the cloning.
This is a gov repository so I'm guessing that it is, indeed, a firewall
rule.  Thanks for all the help!  Guess I should be thankful that 443 is
open to me...

On Wed, Mar 31, 2021 at 12:10 AM 'Dirk Heinrichs' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Am Montag, den 29.03.2021, 12:26 -0700 schrieb eric@gmail.com:
>
> The only thing I can guess is that ssh is getting a question when he
> attempts to connect wanting to be added to the known_hosts file.  Wondering
> if maybe there's a way to establish this if this is indeed the issue?
>
>
> Yes, of course it does, and yes, there is (see my other two replies from
> yesterday). SSH verifies that it indeed connects to the correct *remote*
> host (github.com in this case), by comparing the *HOST* key of the remote
> host it has stored in the *local* user's (or machine's) *known_hosts*
> file. On the first connection, it asks the user to confirm the remote host
> key (unless the user has certain options set in her *~/.ssh/config* to
> either skip the verification completely or accept new keys w/o asking). And
> this is what's happening here.
>
> So, to get out of this, you need to login to your Jenkins machine once (as
> the user running Jenkins), run "ssh g...@github.com" and confirm the host
> key. Or add "StrictHostKeyChecking no" or, if your SSH is recent enough,
> "StrictHostKeyChecking accept-new" to that user's ~/.ssh/config (or
> machine's /etc/ssh/ssh_config).
>
> HTH...
>
> Dirk
>
> --
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dhein...@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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/d8bd7d209c38e258fa083e78f484d2529a9b4cab.camel%40opentext.com
> 
> .
>

-- 
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/CAByBicZijnZo%2BsKteoUCzoTwJ_%3DxFv0Yt7mppbEbkFCa9BR_zQ%40mail.gmail.com.


Re: GitHub Clone to Different Local Directory

2021-03-30 Thread 'Dirk Heinrichs' via Jenkins Users
Am Montag, den 29.03.2021, 12:26 -0700 schrieb eric@gmail.com:

> The only thing I can guess is that ssh is getting a question when he
> attempts to connect wanting to be added to the known_hosts file. 
> Wondering if maybe there's a way to establish this if this is indeed
> the issue?

Yes, of course it does, and yes, there is (see my other two replies
from yesterday). SSH verifies that it indeed connects to the correct
remote host (github.com in this case), by comparing the HOST key of the
remote host it has stored in the local user's (or machine's)
known_hosts file. On the first connection, it asks the user to confirm
the remote host key (unless the user has certain options set in her
~/.ssh/config to either skip the verification completely or accept new
keys w/o asking). And this is what's happening here.

So, to get out of this, you need to login to your Jenkins machine once
(as the user running Jenkins), run "ssh g...@github.com" and confirm the
host key. Or add "StrictHostKeyChecking no" or, if your SSH is recent
enough, "StrictHostKeyChecking accept-new" to that user's ~/.ssh/config
(or machine's /etc/ssh/ssh_config).

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhein...@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 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/d8bd7d209c38e258fa083e78f484d2529a9b4cab.camel%40opentext.com.


signature.asc
Description: This is a digitally signed message part


Re: GitHub Clone to Different Local Directory

2021-03-30 Thread Eric Fetzer
On second thought, I don't think this ever worked at all.  I had attempted
to add a line to the known_hosts file yesterday, that was probably what I
saw and thought it worked but transposed.  The transposition was me.  I'm
giving up on the rsa thing, going back to my clunky way to do it.  Thanks
for trying!

On Tue, Mar 30, 2021 at 11:56 AM Eric Fetzer  wrote:

> Holy cow, this is NOT my day.  So I did it once and it appeared to work.
> I vi'd the known_hosts file and it was at the bottom but it looked like it
> was transposed wrong (instead of a.b.c.d, it had b.a.c.d).  So I deleted
> that line and redid the entry.  It no longer adds to my known_hosts file
> even though it throws no error.  I'm totally lost as to what is happening
> here...
>
> On Tue, Mar 30, 2021 at 11:26 AM Jérôme Godbout 
> wrote:
>
>> Do not check if the first command succeed, it remove previous entry if
>> any. If none was present the command will fail.
>>
>>
>>
>> Do the following:
>>
>>
>>
>> String domain = “github.com”;
>>
>> sh("ssh-keygen -R ${domain} -f \".ssh/known_hosts\"", returnStatus: true);
>>
>> sh("ssh-keyscan -t rsa ${domain} >> \".ssh/known_hosts\"")
>>
>> Now that should do it, you do not really care if the remove hit something
>> or not, just make sure you do not have an old invalid entry.
>>
>>
>>
>> *Jérôme Godbout, B. Ing.*
>>
>>
>> Software / Firmware Team Lead
>> *O:* (418) 682-3636 ext.: 114
>>
>> *C:* (581) 777-0050
>> godbo...@dimonoff.com
>>
>> [image: signature_1235056834] <https://www.dimonoff.com/>
>>
>> *dimonoff.com* <https://www.dimonoff.com/>
>>
>> 1015 Avenue Wilfrid-Pelletier,
>>
>> Québec, QC G1W 0C4, 4e étage
>>
>>
>>
>>
>>
>> *From: *jenkinsci-users@googlegroups.com <
>> jenkinsci-users@googlegroups.com> on behalf of Eric Fetzer <
>> eric.fet...@gmail.com>
>> *Date: *Tuesday, March 30, 2021 at 1:18 PM
>> *To: *jenkinsci-users@googlegroups.com 
>> *Subject: *Re: GitHub Clone to Different Local Directory
>>
>> For this one I get "Host 'myDomain' not found in .ssh/known_hosts".  Not
>> sure what I should be using for domain.  Seems it should be github.com
>> in the example, so if my connection is 
>> g...@mygitproject.mydomain.com:/my/project,
>> I would put "myGitProject.mydomain.com" in there.  Is that correct?
>>
>>
>>
>> On Tue, Mar 30, 2021 at 9:44 AM Jérôme Godbout 
>> wrote:
>>
>> Oups my bad, in my hurry I forgot to change the right exe, I keep those
>> into variable and I badly refilled them here:
>>
>>
>>
>> sh("ssh-keygen -R ${domain} -f \".ssh/known_hosts\"")
>>
>> sh("ssh-keyscan -t rsa ${domain} >> \".ssh/known_hosts\"")
>>
>> The first one removes any old entry, the second one adds the record to
>> the file.
>>
>>
>>
>> *Jérôme Godbout, B. Ing.*
>>
>>
>> Software / Firmware Team Lead
>> *O:* (418) 682-3636 ext.: 114
>>
>> *C:* (581) 777-0050
>> godbo...@dimonoff.com
>>
>> [image: signature_796898478] <https://www.dimonoff.com/>
>>
>> *dimonoff.com* <https://www.dimonoff.com/>
>>
>> 1015 Avenue Wilfrid-Pelletier,
>>
>> Québec, QC G1W 0C4, 4e étage
>>
>>
>>
>>
>>
>> *From: *jenkinsci-users@googlegroups.com <
>> jenkinsci-users@googlegroups.com> on behalf of Eric Fetzer <
>> eric.fet...@gmail.com>
>> *Date: *Tuesday, March 30, 2021 at 10:15 AM
>> *To: *jenkinsci-users@googlegroups.com 
>> *Subject: *Re: GitHub Clone to Different Local Directory
>>
>> So the url is git@a.b.c.d and I tried to use your first command with
>> a.b.c.d for domain and got "bad remote forwarding specification".  I tried
>> it with b.c.d and c.d as well resulting in the same error.  Any ideas?
>> Thanks!
>>
>>
>>
>> On Mon, Mar 29, 2021 at 2:06 PM Jérôme Godbout 
>> wrote:
>>
>> I do add the domain and hsot to my known host file before to avoid that
>> nasty confirm:
>>
>>
>>
>> sh("ssh -R ${domain} -f \".ssh/known_hosts\"")
>>
>> sh("ssh -t rsa ${domain} >> \".ssh/known_hosts\"")
>>
>>
>>
>> that should do the trick and avoid that prompt when later used. Use the
>> domain of the repos url domain.
>&g

Re: GitHub Clone to Different Local Directory

2021-03-30 Thread Eric Fetzer
Holy cow, this is NOT my day.  So I did it once and it appeared to work.  I
vi'd the known_hosts file and it was at the bottom but it looked like it
was transposed wrong (instead of a.b.c.d, it had b.a.c.d).  So I deleted
that line and redid the entry.  It no longer adds to my known_hosts file
even though it throws no error.  I'm totally lost as to what is happening
here...

On Tue, Mar 30, 2021 at 11:26 AM Jérôme Godbout  wrote:

> Do not check if the first command succeed, it remove previous entry if
> any. If none was present the command will fail.
>
>
>
> Do the following:
>
>
>
> String domain = “github.com”;
>
> sh("ssh-keygen -R ${domain} -f \".ssh/known_hosts\"", returnStatus: true);
>
> sh("ssh-keyscan -t rsa ${domain} >> \".ssh/known_hosts\"")
>
> Now that should do it, you do not really care if the remove hit something
> or not, just make sure you do not have an old invalid entry.
>
>
>
> *Jérôme Godbout, B. Ing.*
>
>
> Software / Firmware Team Lead
> *O:* (418) 682-3636 ext.: 114
>
> *C:* (581) 777-0050
> godbo...@dimonoff.com
>
> [image: signature_1235056834] <https://www.dimonoff.com/>
>
> *dimonoff.com* <https://www.dimonoff.com/>
>
> 1015 Avenue Wilfrid-Pelletier,
>
> Québec, QC G1W 0C4, 4e étage
>
>
>
>
>
> *From: *jenkinsci-users@googlegroups.com 
> on behalf of Eric Fetzer 
> *Date: *Tuesday, March 30, 2021 at 1:18 PM
> *To: *jenkinsci-users@googlegroups.com 
> *Subject: *Re: GitHub Clone to Different Local Directory
>
> For this one I get "Host 'myDomain' not found in .ssh/known_hosts".  Not
> sure what I should be using for domain.  Seems it should be github.com in
> the example, so if my connection is 
> g...@mygitproject.mydomain.com:/my/project,
> I would put "myGitProject.mydomain.com" in there.  Is that correct?
>
>
>
> On Tue, Mar 30, 2021 at 9:44 AM Jérôme Godbout  wrote:
>
> Oups my bad, in my hurry I forgot to change the right exe, I keep those
> into variable and I badly refilled them here:
>
>
>
> sh("ssh-keygen -R ${domain} -f \".ssh/known_hosts\"")
>
> sh("ssh-keyscan -t rsa ${domain} >> \".ssh/known_hosts\"")
>
> The first one removes any old entry, the second one adds the record to the
> file.
>
>
>
> *Jérôme Godbout, B. Ing.*
>
>
> Software / Firmware Team Lead
> *O:* (418) 682-3636 ext.: 114
>
> *C:* (581) 777-0050
> godbo...@dimonoff.com
>
> [image: signature_796898478] <https://www.dimonoff.com/>
>
> *dimonoff.com* <https://www.dimonoff.com/>
>
> 1015 Avenue Wilfrid-Pelletier,
>
> Québec, QC G1W 0C4, 4e étage
>
>
>
>
>
> *From: *jenkinsci-users@googlegroups.com 
> on behalf of Eric Fetzer 
> *Date: *Tuesday, March 30, 2021 at 10:15 AM
> *To: *jenkinsci-users@googlegroups.com 
> *Subject: *Re: GitHub Clone to Different Local Directory
>
> So the url is git@a.b.c.d and I tried to use your first command with
> a.b.c.d for domain and got "bad remote forwarding specification".  I tried
> it with b.c.d and c.d as well resulting in the same error.  Any ideas?
> Thanks!
>
>
>
> On Mon, Mar 29, 2021 at 2:06 PM Jérôme Godbout  wrote:
>
> I do add the domain and hsot to my known host file before to avoid that
> nasty confirm:
>
>
>
> sh("ssh -R ${domain} -f \".ssh/known_hosts\"")
>
> sh("ssh -t rsa ${domain} >> \".ssh/known_hosts\"")
>
>
>
> that should do the trick and avoid that prompt when later used. Use the
> domain of the repos url domain.
>
>
>
> *Jérôme Godbout, B. Ing.*
>
>
> Software / Firmware Team Lead
> *O:* (418) 682-3636 ext.: 114
>
> *C:* (581) 777-0050
> godbo...@dimonoff.com
>
> [image: signature_168530195] <https://www.dimonoff.com/>
>
> *dimonoff.com* <https://www.dimonoff.com/>
>
> 1015 Avenue Wilfrid-Pelletier,
>
> Québec, QC G1W 0C4, 4e étage
>
>
>
>
>
> *From: *jenkinsci-users@googlegroups.com 
> on behalf of eric@gmail.com 
> *Date: *Monday, March 29, 2021 at 3:27 PM
> *To: *Jenkins Users 
> *Subject: *Re: GitHub Clone to Different Local Directory
>
> The only thing I can guess is that ssh is getting a question when he
> attempts to connect wanting to be added to the known_hosts file.  Wondering
> if maybe there's a way to establish this if this is indeed the issue?
>
> On Monday, March 29, 2021 at 12:07:01 PM UTC-6 eric@gmail.com wrote:
>
> Thanks Mark!  I believe I'm one step closer but it's still not working.
> I'm now getting:
>
>

Re: GitHub Clone to Different Local Directory

2021-03-30 Thread Jérôme Godbout
Do not check if the first command succeed, it remove previous entry if any. If 
none was present the command will fail.

Do the following:

String domain = “github.com”;
sh("ssh-keygen -R ${domain} -f \".ssh/known_hosts\"", returnStatus: true);
sh("ssh-keyscan -t rsa ${domain} >> \".ssh/known_hosts\"")
Now that should do it, you do not really care if the remove hit something or 
not, just make sure you do not have an old invalid entry.

Jérôme Godbout, B. Ing.

Software / Firmware Team Lead
O: (418) 682-3636 ext.: 114
C: (581) 777-0050
godbo...@dimonoff.com<mailto:godbo...@dimonoff.com>
[signature_1235056834]<https://www.dimonoff.com/>
dimonoff.com<https://www.dimonoff.com/>
1015 Avenue Wilfrid-Pelletier,
Québec, QC G1W 0C4, 4e étage


From: jenkinsci-users@googlegroups.com  on 
behalf of Eric Fetzer 
Date: Tuesday, March 30, 2021 at 1:18 PM
To: jenkinsci-users@googlegroups.com 
Subject: Re: GitHub Clone to Different Local Directory
For this one I get "Host 'myDomain' not found in .ssh/known_hosts".  Not sure 
what I should be using for domain.  Seems it should be 
github.com<http://github.com> in the example, so if my connection is 
g...@mygitproject.mydomain.com:/my/project, I would put 
"myGitProject.mydomain.com<http://myGitProject.mydomain.com>" in there.  Is 
that correct?

On Tue, Mar 30, 2021 at 9:44 AM Jérôme Godbout 
mailto:godbo...@amotus.ca>> wrote:
Oups my bad, in my hurry I forgot to change the right exe, I keep those into 
variable and I badly refilled them here:

sh("ssh-keygen -R ${domain} -f \".ssh/known_hosts\"")
sh("ssh-keyscan -t rsa ${domain} >> \".ssh/known_hosts\"")
The first one removes any old entry, the second one adds the record to the file.

Jérôme Godbout, B. Ing.

Software / Firmware Team Lead
O: (418) 682-3636 ext.: 114
C: (581) 777-0050
godbo...@dimonoff.com<mailto:godbo...@dimonoff.com>
[signature_796898478]<https://www.dimonoff.com/>
dimonoff.com<https://www.dimonoff.com/>
1015 Avenue Wilfrid-Pelletier,
Québec, QC G1W 0C4, 4e étage


From: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com> 
mailto:jenkinsci-users@googlegroups.com>> on 
behalf of Eric Fetzer mailto:eric.fet...@gmail.com>>
Date: Tuesday, March 30, 2021 at 10:15 AM
To: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com> 
mailto:jenkinsci-users@googlegroups.com>>
Subject: Re: GitHub Clone to Different Local Directory
So the url is git@a.b.c.d and I tried to use your first command with a.b.c.d 
for domain and got "bad remote forwarding specification".  I tried it with 
b.c.d and c.d as well resulting in the same error.  Any ideas?  Thanks!

On Mon, Mar 29, 2021 at 2:06 PM Jérôme Godbout 
mailto:godbo...@amotus.ca>> wrote:
I do add the domain and hsot to my known host file before to avoid that nasty 
confirm:

sh("ssh -R ${domain} -f \".ssh/known_hosts\"")
sh("ssh -t rsa ${domain} >> \".ssh/known_hosts\"")

that should do the trick and avoid that prompt when later used. Use the domain 
of the repos url domain.

Jérôme Godbout, B. Ing.

Software / Firmware Team Lead
O: (418) 682-3636 ext.: 114
C: (581) 777-0050
godbo...@dimonoff.com<mailto:godbo...@dimonoff.com>
[signature_168530195]<https://www.dimonoff.com/>
dimonoff.com<https://www.dimonoff.com/>
1015 Avenue Wilfrid-Pelletier,
Québec, QC G1W 0C4, 4e étage


From: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com> 
mailto:jenkinsci-users@googlegroups.com>> on 
behalf of eric@gmail.com<mailto:eric@gmail.com> 
mailto:eric.fet...@gmail.com>>
Date: Monday, March 29, 2021 at 3:27 PM
To: Jenkins Users 
mailto:jenkinsci-users@googlegroups.com>>
Subject: Re: GitHub Clone to Different Local Directory
The only thing I can guess is that ssh is getting a question when he attempts 
to connect wanting to be added to the known_hosts file.  Wondering if maybe 
there's a way to establish this if this is indeed the issue?
On Monday, March 29, 2021 at 12:07:01 PM UTC-6 
eric@gmail.com<mailto:eric@gmail.com> wrote:
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, 

Re: GitHub Clone to Different Local Directory

2021-03-30 Thread Eric Fetzer
For this one I get "Host 'myDomain' not found in .ssh/known_hosts".  Not
sure what I should be using for domain.  Seems it should be github.com in
the example, so if my connection is g...@mygitproject.mydomain.com:/my/project,
I would put "myGitProject.mydomain.com" in there.  Is that correct?

On Tue, Mar 30, 2021 at 9:44 AM Jérôme Godbout  wrote:

> Oups my bad, in my hurry I forgot to change the right exe, I keep those
> into variable and I badly refilled them here:
>
>
>
> sh("ssh-keygen -R ${domain} -f \".ssh/known_hosts\"")
>
> sh("ssh-keyscan -t rsa ${domain} >> \".ssh/known_hosts\"")
>
> The first one removes any old entry, the second one adds the record to the
> file.
>
>
>
> *Jérôme Godbout, B. Ing.*
>
>
> Software / Firmware Team Lead
> *O:* (418) 682-3636 ext.: 114
>
> *C:* (581) 777-0050
> godbo...@dimonoff.com
>
> [image: signature_796898478] <https://www.dimonoff.com/>
>
> *dimonoff.com* <https://www.dimonoff.com/>
>
> 1015 Avenue Wilfrid-Pelletier,
>
> Québec, QC G1W 0C4, 4e étage
>
>
>
>
>
> *From: *jenkinsci-users@googlegroups.com 
> on behalf of Eric Fetzer 
> *Date: *Tuesday, March 30, 2021 at 10:15 AM
> *To: *jenkinsci-users@googlegroups.com 
> *Subject: *Re: GitHub Clone to Different Local Directory
>
> So the url is git@a.b.c.d and I tried to use your first command with
> a.b.c.d for domain and got "bad remote forwarding specification".  I tried
> it with b.c.d and c.d as well resulting in the same error.  Any ideas?
> Thanks!
>
>
>
> On Mon, Mar 29, 2021 at 2:06 PM Jérôme Godbout  wrote:
>
> I do add the domain and hsot to my known host file before to avoid that
> nasty confirm:
>
>
>
> sh("ssh -R ${domain} -f \".ssh/known_hosts\"")
>
> sh("ssh -t rsa ${domain} >> \".ssh/known_hosts\"")
>
>
>
> that should do the trick and avoid that prompt when later used. Use the
> domain of the repos url domain.
>
>
>
> *Jérôme Godbout, B. Ing.*
>
>
> Software / Firmware Team Lead
> *O:* (418) 682-3636 ext.: 114
>
> *C:* (581) 777-0050
> godbo...@dimonoff.com
>
> [image: signature_168530195] <https://www.dimonoff.com/>
>
> *dimonoff.com* <https://www.dimonoff.com/>
>
> 1015 Avenue Wilfrid-Pelletier,
>
> Québec, QC G1W 0C4, 4e étage
>
>
>
>
>
> *From: *jenkinsci-users@googlegroups.com 
> on behalf of eric@gmail.com 
> *Date: *Monday, March 29, 2021 at 3:27 PM
> *To: *Jenkins Users 
> *Subject: *Re: GitHub Clone to Different Local Directory
>
> The only thing I can guess is that ssh is getting a question when he
> attempts to connect wanting to be added to the known_hosts file.  Wondering
> if maybe there's a way to establish this if this is indeed the issue?
>
> On Monday, March 29, 2021 at 12:07:01 PM UTC-6 eric@gmail.com wrote:
>
> 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  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

Re: GitHub Clone to Different Local Directory

2021-03-30 Thread Jérôme Godbout
Oups my bad, in my hurry I forgot to change the right exe, I keep those into 
variable and I badly refilled them here:

sh("ssh-keygen -R ${domain} -f \".ssh/known_hosts\"")
sh("ssh-keyscan -t rsa ${domain} >> \".ssh/known_hosts\"")
The first one removes any old entry, the second one adds the record to the file.

Jérôme Godbout, B. Ing.

Software / Firmware Team Lead
O: (418) 682-3636 ext.: 114
C: (581) 777-0050
godbo...@dimonoff.com<mailto:godbo...@dimonoff.com>
[signature_796898478]<https://www.dimonoff.com/>
dimonoff.com<https://www.dimonoff.com/>
1015 Avenue Wilfrid-Pelletier,
Québec, QC G1W 0C4, 4e étage


From: jenkinsci-users@googlegroups.com  on 
behalf of Eric Fetzer 
Date: Tuesday, March 30, 2021 at 10:15 AM
To: jenkinsci-users@googlegroups.com 
Subject: Re: GitHub Clone to Different Local Directory
So the url is git@a.b.c.d and I tried to use your first command with a.b.c.d 
for domain and got "bad remote forwarding specification".  I tried it with 
b.c.d and c.d as well resulting in the same error.  Any ideas?  Thanks!

On Mon, Mar 29, 2021 at 2:06 PM Jérôme Godbout 
mailto:godbo...@amotus.ca>> wrote:
I do add the domain and hsot to my known host file before to avoid that nasty 
confirm:

sh("ssh -R ${domain} -f \".ssh/known_hosts\"")
sh("ssh -t rsa ${domain} >> \".ssh/known_hosts\"")

that should do the trick and avoid that prompt when later used. Use the domain 
of the repos url domain.

Jérôme Godbout, B. Ing.

Software / Firmware Team Lead
O: (418) 682-3636 ext.: 114
C: (581) 777-0050
godbo...@dimonoff.com<mailto:godbo...@dimonoff.com>
[signature_168530195]<https://www.dimonoff.com/>
dimonoff.com<https://www.dimonoff.com/>
1015 Avenue Wilfrid-Pelletier,
Québec, QC G1W 0C4, 4e étage


From: jenkinsci-users@googlegroups.com<mailto:jenkinsci-users@googlegroups.com> 
mailto:jenkinsci-users@googlegroups.com>> on 
behalf of eric@gmail.com<mailto:eric....@gmail.com> 
mailto:eric.fet...@gmail.com>>
Date: Monday, March 29, 2021 at 3:27 PM
To: Jenkins Users 
mailto:jenkinsci-users@googlegroups.com>>
Subject: Re: GitHub Clone to Different Local Directory
The only thing I can guess is that ssh is getting a question when he attempts 
to connect wanting to be added to the known_hosts file.  Wondering if maybe 
there's a way to establish this if this is indeed the issue?
On Monday, March 29, 2021 at 12:07:01 PM UTC-6 
eric@gmail.com<mailto:eric@gmail.com> wrote:
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 
mailto: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.ch

Re: GitHub Clone to Different Local Directory

2021-03-30 Thread Eric Fetzer
So the url is git@a.b.c.d and I tried to use your first command with
a.b.c.d for domain and got "bad remote forwarding specification".  I tried
it with b.c.d and c.d as well resulting in the same error.  Any ideas?
Thanks!

On Mon, Mar 29, 2021 at 2:06 PM Jérôme Godbout  wrote:

> I do add the domain and hsot to my known host file before to avoid that
> nasty confirm:
>
>
>
> sh("ssh -R ${domain} -f \".ssh/known_hosts\"")
>
> sh("ssh -t rsa ${domain} >> \".ssh/known_hosts\"")
>
>
>
> that should do the trick and avoid that prompt when later used. Use the
> domain of the repos url domain.
>
>
>
> *Jérôme Godbout, B. Ing.*
>
>
> Software / Firmware Team Lead
> *O:* (418) 682-3636 ext.: 114
>
> *C:* (581) 777-0050
> godbo...@dimonoff.com
>
> [image: signature_168530195] <https://www.dimonoff.com/>
>
> *dimonoff.com* <https://www.dimonoff.com/>
>
> 1015 Avenue Wilfrid-Pelletier,
>
> Québec, QC G1W 0C4, 4e étage
>
>
>
>
>
> *From: *jenkinsci-users@googlegroups.com 
> on behalf of eric@gmail.com 
> *Date: *Monday, March 29, 2021 at 3:27 PM
> *To: *Jenkins Users 
> *Subject: *Re: GitHub Clone to Different Local Directory
>
> The only thing I can guess is that ssh is getting a question when he
> attempts to connect wanting to be added to the known_hosts file.  Wondering
> if maybe there's a way to establish this if this is indeed the issue?
>
> On Monday, March 29, 2021 at 12:07:01 PM UTC-6 eric@gmail.com wrote:
>
> 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  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)
>
>  a

Re: GitHub Clone to Different Local Directory

2021-03-29 Thread 'Dirk Heinrichs' via Jenkins Users
Am Dienstag, den 30.03.2021, 05:59 + schrieb 'Dirk Heinrichs' via
Jenkins Users:
> Am Montag, den 29.03.2021, 11:07 -0700 schrieb eric@gmail.com:
> 
> > Please make sure you have the correct access rights
> > and the repository exists.
> 
> Oh, yes, forgot that: On the host(s) that does/do the cloning, you
> need to either
> connect to g...@github.com once per SSH on the console and as the user
> who runs Jenkins, to add the GH host key to that users known_hosts
> file, oradd a host block to that users ~/.ssh/config file like:
> host github
> Hostname github.com
> User git
> IdentityFile ~/.ssh/my_github_key
> ServerAliveInterval 15
>StrictHostKeyChecking no
> 
> In the second case, you also don't need to store the credentials in
> Jenkins, since you can use the alias "github" directly in your URLs,
> like "github:path/to/repo" (instead of "g...@github.com:..."). If
> you're reluctant to skip host key verification, you can also omit the
> last line and combine the two methods.

If you are running many Jenkins agents you can of course do the first
step once on one of them and then copy the GH host key into either the
user's ~/.ssh/.known_hosts or the global /etc/ssh/ssh_known_hosts file
on the other ones.

Bye...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhein...@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 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/555dfc6a05436febb4f16d0a5d81b7a1c4c3f928.camel%40opentext.com.


signature.asc
Description: This is a digitally signed message part


Re: GitHub Clone to Different Local Directory

2021-03-29 Thread 'Dirk Heinrichs' via Jenkins Users
Am Montag, den 29.03.2021, 11:07 -0700 schrieb eric@gmail.com:

> Please make sure you have the correct access rights
> and the repository exists.

Oh, yes, forgot that: On the host(s) that does/do the cloning, you need
to either
 * connect to g...@github.com once per SSH on the console and as the
user who runs Jenkins, to add the GH host key to that users known_hosts
file, or
 * add a host block to that users ~/.ssh/config file like:host github
   Hostname github.comUser gitIdentityFile
~/.ssh/my_github_keyServerAliveInterval 15 
 StrictHostKeyChecking no


In the second case, you also don't need to store the credentials in
Jenkins, since you can use the alias "github" directly in your URLs,
like "github:path/to/repo" (instead of "g...@github.com:..."). If you're
reluctant to skip host key verification, you can also omit the last
line and combine the two methods.

Bye...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhein...@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 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/326bd980bf6fb0c452acc3581fbdda80ec870166.camel%40opentext.com.


signature.asc
Description: This is a digitally signed message part


Re: GitHub Clone to Different Local Directory

2021-03-29 Thread Jérôme Godbout
I do add the domain and hsot to my known host file before to avoid that nasty 
confirm:

sh("ssh -R ${domain} -f \".ssh/known_hosts\"")
sh("ssh -t rsa ${domain} >> \".ssh/known_hosts\"")

that should do the trick and avoid that prompt when later used. Use the domain 
of the repos url domain.

Jérôme Godbout, B. Ing.

Software / Firmware Team Lead
O: (418) 682-3636 ext.: 114
C: (581) 777-0050
godbo...@dimonoff.com<mailto:godbo...@dimonoff.com>
[signature_168530195]<https://www.dimonoff.com/>
dimonoff.com<https://www.dimonoff.com/>
1015 Avenue Wilfrid-Pelletier,
Québec, QC G1W 0C4, 4e étage


From: jenkinsci-users@googlegroups.com  on 
behalf of eric@gmail.com 
Date: Monday, March 29, 2021 at 3:27 PM
To: Jenkins Users 
Subject: Re: GitHub Clone to Different Local Directory
The only thing I can guess is that ssh is getting a question when he attempts 
to connect wanting to be added to the known_hosts file.  Wondering if maybe 
there's a way to establish this if this is indeed the issue?
On Monday, March 29, 2021 at 12:07:01 PM UTC-6 eric@gmail.com wrote:
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  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  wrote:
O, 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 
 wrote:
Am Montag, den 29.03.2021, 07:44 -0600 schrieb Eric Fetzer:

Thanks for your reply Dirk!  I'm 

Re: GitHub Clone to Different Local Directory

2021-03-29 Thread eric....@gmail.com
The only thing I can guess is that ssh is getting a question when he 
attempts to connect wanting to be added to the known_hosts file.  Wondering 
if maybe there's a way to establish this if this is indeed the issue?

On Monday, March 29, 2021 at 12:07:01 PM UTC-6 eric@gmail.com wrote:

> 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  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 
>>> 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 
>>> 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 
>>> 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 
>>> 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 
>>> 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  wrote:
>>>
 O, 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

Re: GitHub Clone to Different Local Directory

2021-03-29 Thread eric....@gmail.com
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  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 
>> 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 
>> 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 
>> 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 
>> 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 
>> 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  wrote:
>>
>>> O, 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

Re: GitHub Clone to Different Local Directory

2021-03-29 Thread Mark Waite
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  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 
> 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 
> 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 
> 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 
> 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 
> 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  wrote:
>
>> O, 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 <
>> jenkinsci-users@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
>>> *Email*: dhein...@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 unsub

Re: GitHub Clone to Different Local Directory

2021-03-29 Thread Eric Fetzer
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
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
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
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
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
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  wrote:

> O, 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 <
> jenkinsci-users@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
>> *Email*: dhein...@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-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/7363fbe30406b54bee9b6671dc9754cbf78081c7.camel%40opentext.com
>> 
>> .
>>
>

Re: GitHub Clone to Different Local Directory

2021-03-29 Thread Eric Fetzer
O, 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 <
jenkinsci-users@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
> *Email*: dhein...@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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/7363fbe30406b54bee9b6671dc9754cbf78081c7.camel%40opentext.com
> 
> .
>

-- 
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/CAByBicYr9i_qnSwUPmqMHR5Q-NOd4hpN455dyAZNXLRHJzEGYw%40mail.gmail.com.


Re: GitHub Clone to Different Local Directory

2021-03-29 Thread 'Dirk Heinrichs' via Jenkins Users
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
Email: dhein...@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 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/7363fbe30406b54bee9b6671dc9754cbf78081c7.camel%40opentext.com.


signature.asc
Description: This is a digitally signed message part


Re: GitHub Clone to Different Local Directory

2021-03-29 Thread 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.

On Mon, Mar 29, 2021 at 7:40 AM 'Dirk Heinrichs' via Jenkins Users <
jenkinsci-users@googlegroups.com> wrote:

> Am Montag, den 29.03.2021, 07:22 -0600 schrieb Eric Fetzer:
>
> It was a bit painful, but at least it gets it done.  What I've implemented
> is passing the workspace to the checkout, checking out as my user to my
> user workspace (home directory), moving the files checked out to the
> jenkins workspace, using sudo to chown the folder and files to be owned by
> the jenkins user.  It's very crude but it works.  I'm going to take a look
> at Mark's option above, but at least I found something that will work...
>
>
> We've been doing GitHub checkouts from Jenkins for quite some time (until
> we moved the other way round, to a self-hosted GitLab), and didn't have any
> problems. However, we used SSH keys, which can be added to Jenkins
> Credentials and then used by the plain Git plugin in any Freestyle or
> Pipeline job.
>
> HTH...
>
> Dirk
>
> --
>
> *Dirk Heinrichs*
> Senior Systems Engineer, Delivery Pipeline
> OpenText ™ Discovery | Recommind
> *Phone*: +49 2226 15966 18
> *Email*: dhein...@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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/1f5a073cd7dd8172fff194b00193e4b52f6b2772.camel%40opentext.com
> 
> .
>

-- 
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/CAByBicbPEtLAfdTx6ta6UKRyxKotYYhH1Xo1-r3DmR_A__X0pQ%40mail.gmail.com.


Re: GitHub Clone to Different Local Directory

2021-03-29 Thread 'Dirk Heinrichs' via Jenkins Users
Am Montag, den 29.03.2021, 07:22 -0600 schrieb Eric Fetzer:

> It was a bit painful, but at least it gets it done.  What I've
> implemented is passing the workspace to the checkout, checking out as
> my user to my user workspace (home directory), moving the files
> checked out to the jenkins workspace, using sudo to chown the folder
> and files to be owned by the jenkins user.  It's very crude but it
> works.  I'm going to take a look at Mark's option above, but at least
> I found something that will work...

We've been doing GitHub checkouts from Jenkins for quite some time
(until we moved the other way round, to a self-hosted GitLab), and
didn't have any problems. However, we used SSH keys, which can be added
to Jenkins Credentials and then used by the plain Git plugin in any
Freestyle or Pipeline job.

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: dhein...@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 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/1f5a073cd7dd8172fff194b00193e4b52f6b2772.camel%40opentext.com.


signature.asc
Description: This is a digitally signed message part


Re: GitHub Clone to Different Local Directory

2021-03-29 Thread Eric Fetzer
Where I got the info to make this work, Bjorn, is from the thread that your
thread referenced:

https://stackoverflow.com/questions/56809684/git-clone-in-jenkins-with-personal-access-token-idles-forever/61104603#61104603

It was a bit painful, but at least it gets it done.  What I've implemented
is passing the workspace to the checkout, checking out as my user to my
user workspace (home directory), moving the files checked out to the
jenkins workspace, using sudo to chown the folder and files to be owned by
the jenkins user.  It's very crude but it works.  I'm going to take a look
at Mark's option above, but at least I found something that will work...

On Mon, Mar 29, 2021 at 7:14 AM eric@gmail.com 
wrote:

> Yes Bjorn, that's the thread I used to figure out how to use the access
> token.  Unfortunately, the jenkins plugin isn't smart enough to pass a
> username, it uses the username it runs as.  So my master node is running as
> the user "jenkins" so it tries to authenticate to GitHub Enterprise as
> jenkins: run as my user, which thankfully, is the same username as I have in GitHub
> Enterprise.  Smoke and mirrors...
>
> On Monday, March 29, 2021 at 3:26:47 AM UTC-6 ice...@googlemail.com wrote:
>
>> Did you try to use credentials in jenkins to store the token  instead of
>> fiddling  with token on the machine?
>> See e.g.
>> https://stackoverflow.com/questions/61105368/how-to-use-github-personal-access-token-in-jenkins
>>
>>
>> Then you could do everything in one job instead of  doing some copy-magic
>> (which would  horribly break once you start to use more nodes).
>>
>> Björn
>> eric@gmail.com schrieb am Samstag, 27. März 2021 um 04:05:44 UTC+1:
>>
>>> Thanks Mark, I'll check it out.  Has to beat the hokey workaround I
>>> worked up.  :)
>>>
>>>
>>>
>>> Sent from my T-Mobile 4G LTE Device
>>>
>>>
>>>  Original message 
>>> From: Mark Waite 
>>> Date: 3/26/21 10:49 PM (GMT-05:00)
>>> To: Jenkins Users 
>>> Subject: Re: GitHub Clone to Different Local Directory
>>>
>>> Good point.  How about the external workspace plugin from GSoC 2016?
>>> https://plugins.jenkins.io/external-workspace-manager/
>>>
>>> On Fri, Mar 26, 2021 at 8:00 PM eric.fetzer  wrote:
>>>
>>>> Thanks for the response Mark..  I'm using freestyle.  Doesn't checkout
>>>> to a subdirectory only take relative paths?
>>>>
>>>>
>>>>
>>>> Sent from my T-Mobile 4G LTE Device
>>>>
>>>>
>>>>  Original message 
>>>> From: Mark Waite 
>>>> Date: 3/26/21 6:44 PM (GMT-05:00)
>>>> To: Jenkins Users 
>>>> Subject: Re: GitHub Clone to Different Local Directory
>>>>
>>>> If you're using pipeline, change to that directory with the
>>>> dir('/users/username/projectname') { } wrapper around the checkout step;
>>>>
>>>> If you're using a freestyle job, use the git plugin extension 'checkout
>>>> to a subdirectory'
>>>> <https://plugins.jenkins.io/git/#checkout-to-a-sub-directory>
>>>>
>>>> On Fri, Mar 26, 2021 at 10:54 AM eric@gmail.com 
>>>> wrote:
>>>>
>>>>> OK, so this is kind of complex so hang with me.  We're moving from
>>>>> StarTeam to Github and I'm trying to reproduce what I'm doing in StarTeam
>>>>> with Github.  StarTeam was easy because I owned the repository machine as
>>>>> well as administrated the tool.  With Github, we're hosted.  So I'm admin
>>>>> on the project but can't create an RSA Token on the machine for easy
>>>>> access.  So I had to play around to make a personal access token work.  In
>>>>> order to make that access token work, I had to run the checkout job on a
>>>>> different node so that it was running as a user that lived in Github as
>>>>> well (access token's namesake).  So when this job gets called from the
>>>>> jenkins job, I want it to clone to the calling job's workspace
>>>>> (/opt/jenkins/workspace/).  Well since in order to
>>>>> authenticate, it lives in it's own shell, the workspace for this guy, and
>>>>> where it wants to clone to, is /home//.  All that
>>>>> for my question:  how can I specify what folder to checkout to?  I tried 
>>>>> to
>>>>>

Re: GitHub Clone to Different Local Directory

2021-03-29 Thread eric....@gmail.com
Yes Bjorn, that's the thread I used to figure out how to use the access 
token.  Unfortunately, the jenkins plugin isn't smart enough to pass a 
username, it uses the username it runs as.  So my master node is running as 
the user "jenkins" so it tries to authenticate to GitHub Enterprise as 
jenkins: Did you try to use credentials in jenkins to store the token  instead of  
> fiddling  with token on the machine?
> See e.g. 
> https://stackoverflow.com/questions/61105368/how-to-use-github-personal-access-token-in-jenkins
>
>
> Then you could do everything in one job instead of  doing some copy-magic 
> (which would  horribly break once you start to use more nodes).
>
> Björn
> eric@gmail.com schrieb am Samstag, 27. März 2021 um 04:05:44 UTC+1:
>
>> Thanks Mark, I'll check it out.  Has to beat the hokey workaround I 
>> worked up.  :)
>>
>>
>>
>> Sent from my T-Mobile 4G LTE Device
>>
>>
>>  Original message ----
>> From: Mark Waite  
>> Date: 3/26/21 10:49 PM (GMT-05:00) 
>> To: Jenkins Users  
>> Subject: Re: GitHub Clone to Different Local Directory 
>>
>> Good point.  How about the external workspace plugin from GSoC 2016?  
>> https://plugins.jenkins.io/external-workspace-manager/
>>
>> On Fri, Mar 26, 2021 at 8:00 PM eric.fetzer  wrote:
>>
>>> Thanks for the response Mark..  I'm using freestyle.  Doesn't checkout 
>>> to a subdirectory only take relative paths?
>>>
>>>
>>>
>>> Sent from my T-Mobile 4G LTE Device
>>>
>>>
>>>  Original message 
>>> From: Mark Waite  
>>> Date: 3/26/21 6:44 PM (GMT-05:00) 
>>> To: Jenkins Users  
>>> Subject: Re: GitHub Clone to Different Local Directory 
>>>
>>> If you're using pipeline, change to that directory with the 
>>> dir('/users/username/projectname') { } wrapper around the checkout step;
>>>
>>> If you're using a freestyle job, use the git plugin extension 'checkout 
>>> to a subdirectory' 
>>> <https://plugins.jenkins.io/git/#checkout-to-a-sub-directory>
>>>
>>> On Fri, Mar 26, 2021 at 10:54 AM eric@gmail.com  
>>> wrote:
>>>
>>>> OK, so this is kind of complex so hang with me.  We're moving from 
>>>> StarTeam to Github and I'm trying to reproduce what I'm doing in StarTeam 
>>>> with Github.  StarTeam was easy because I owned the repository machine as 
>>>> well as administrated the tool.  With Github, we're hosted.  So I'm admin 
>>>> on the project but can't create an RSA Token on the machine for easy 
>>>> access.  So I had to play around to make a personal access token work.  In 
>>>> order to make that access token work, I had to run the checkout job on a 
>>>> different node so that it was running as a user that lived in Github as 
>>>> well (access token's namesake).  So when this job gets called from the 
>>>> jenkins job, I want it to clone to the calling job's workspace 
>>>> (/opt/jenkins/workspace/).  Well since in order to 
>>>> authenticate, it lives in it's own shell, the workspace for this guy, and 
>>>> where it wants to clone to, is /home//.  All that 
>>>> for my question:  how can I specify what folder to checkout to?  I tried 
>>>> to 
>>>> use "checkout to specific local branch" but it fails saying "is not a 
>>>> valid 
>>>> branch name".  Well, yeah, branch is referring to branch not folder, lol.  
>>>> In StarTeam this is easy, you just specify working folder.  Any help?  
>>>> 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 jenkinsci-use...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Jenkins Users&q

Re: GitHub Clone to Different Local Directory

2021-03-29 Thread 'Björn Pedersen' via Jenkins Users
Did you try to use credentials in jenkins to store the token  instead of  
fiddling  with token on the machine?
See 
e.g. 
https://stackoverflow.com/questions/61105368/how-to-use-github-personal-access-token-in-jenkins


Then you could do everything in one job instead of  doing some copy-magic 
(which would  horribly break once you start to use more nodes).

Björn
eric@gmail.com schrieb am Samstag, 27. März 2021 um 04:05:44 UTC+1:

> Thanks Mark, I'll check it out.  Has to beat the hokey workaround I worked 
> up.  :)
>
>
>
> Sent from my T-Mobile 4G LTE Device
>
>
>  Original message 
> From: Mark Waite  
> Date: 3/26/21 10:49 PM (GMT-05:00) 
> To: Jenkins Users  
> Subject: Re: GitHub Clone to Different Local Directory 
>
> Good point.  How about the external workspace plugin from GSoC 2016?  
> https://plugins.jenkins.io/external-workspace-manager/
>
> On Fri, Mar 26, 2021 at 8:00 PM eric.fetzer  wrote:
>
>> Thanks for the response Mark..  I'm using freestyle.  Doesn't checkout to 
>> a subdirectory only take relative paths?
>>
>>
>>
>> Sent from my T-Mobile 4G LTE Device
>>
>>
>>  Original message ----
>> From: Mark Waite  
>> Date: 3/26/21 6:44 PM (GMT-05:00) 
>> To: Jenkins Users  
>> Subject: Re: GitHub Clone to Different Local Directory 
>>
>> If you're using pipeline, change to that directory with the 
>> dir('/users/username/projectname') { } wrapper around the checkout step;
>>
>> If you're using a freestyle job, use the git plugin extension 'checkout 
>> to a subdirectory' 
>> <https://plugins.jenkins.io/git/#checkout-to-a-sub-directory>
>>
>> On Fri, Mar 26, 2021 at 10:54 AM eric@gmail.com  
>> wrote:
>>
>>> OK, so this is kind of complex so hang with me.  We're moving from 
>>> StarTeam to Github and I'm trying to reproduce what I'm doing in StarTeam 
>>> with Github.  StarTeam was easy because I owned the repository machine as 
>>> well as administrated the tool.  With Github, we're hosted.  So I'm admin 
>>> on the project but can't create an RSA Token on the machine for easy 
>>> access.  So I had to play around to make a personal access token work.  In 
>>> order to make that access token work, I had to run the checkout job on a 
>>> different node so that it was running as a user that lived in Github as 
>>> well (access token's namesake).  So when this job gets called from the 
>>> jenkins job, I want it to clone to the calling job's workspace 
>>> (/opt/jenkins/workspace/).  Well since in order to 
>>> authenticate, it lives in it's own shell, the workspace for this guy, and 
>>> where it wants to clone to, is /home//.  All that 
>>> for my question:  how can I specify what folder to checkout to?  I tried to 
>>> use "checkout to specific local branch" but it fails saying "is not a valid 
>>> branch name".  Well, yeah, branch is referring to branch not folder, lol.  
>>> In StarTeam this is easy, you just specify working folder.  Any help?  
>>> 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 jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> -- 
>> 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/CAO49JtG6VTjt8F7Vj5pJW13VQJTfxCqRuZuDHjj5zZTa3jJ9%3Dg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG6VTjt8F7Vj5pJW13VQJTfxCqRuZuDHjj5zZTa3jJ9%3Dg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> -- 
>> You received this message because y

Re: GitHub Clone to Different Local Directory

2021-03-26 Thread eric.fetzer
Thanks Mark, I'll check it out.  Has to beat the hokey workaround I worked up.  
:)Sent from my T-Mobile 4G LTE Device
 Original message From: Mark Waite  
Date: 3/26/21  10:49 PM  (GMT-05:00) To: Jenkins Users 
 Subject: Re: GitHub Clone to Different Local 
Directory Good point.  How about the external workspace plugin from GSoC 2016?  
https://plugins.jenkins.io/external-workspace-manager/On Fri, Mar 26, 2021 at 
8:00 PM eric.fetzer  wrote:Thanks for the response 
Mark..  I'm using freestyle.  Doesn't checkout to a subdirectory only take 
relative paths?Sent from my T-Mobile 4G LTE Device Original message 
From: Mark Waite  Date: 3/26/21  6:44 PM  
(GMT-05:00) To: Jenkins Users  Subject: Re: 
GitHub Clone to Different Local Directory If you're using pipeline, change to 
that directory with the dir('/users/username/projectname') { } wrapper around 
the checkout step;If you're using a freestyle job, use the git plugin extension 
'checkout to a subdirectory'On Fri, Mar 26, 2021 at 10:54 AM eric@gmail.com 
 wrote:OK, so this is kind of complex so hang with me.  
We're moving from StarTeam to Github and I'm trying to reproduce what I'm doing 
in StarTeam with Github.  StarTeam was easy because I owned the repository 
machine as well as administrated the tool.  With Github, we're hosted.  So I'm 
admin on the project but can't create an RSA Token on the machine for easy 
access.  So I had to play around to make a personal access token work.  In 
order to make that access token work, I had to run the checkout job on a 
different node so that it was running as a user that lived in Github as well 
(access token's namesake).  So when this job gets called from the jenkins job, 
I want it to clone to the calling job's workspace 
(/opt/jenkins/workspace/).  Well since in order to authenticate, 
it lives in it's own shell, the workspace for this guy, and where it wants to 
clone to, is /home//.  All that for my question:  how 
can I specify what folder to checkout to?  I tried to use "checkout to specific 
local branch" but it fails saying "is not a valid branch name".  Well, yeah, 
branch is referring to branch not folder, lol.  In StarTeam this is easy, you 
just specify working folder.  Any help?  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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com.




-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG6VTjt8F7Vj5pJW13VQJTfxCqRuZuDHjj5zZTa3jJ9%3Dg%40mail.gmail.com.




-- 
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/605e9199.1c69fb81.932c2.d78c%40mx.google.com.




-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHWfuOvLQubF%2BWHBoExHugTGd_FnmEvh2fHWPMNcH08ZQ%40mail.gmail.com.

-- 
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/605ea0fc.1c69fb81.fb3e3.5cbf%40mx.google.com.


Re: GitHub Clone to Different Local Directory

2021-03-26 Thread Mark Waite
Good point.  How about the external workspace plugin from GSoC 2016?
https://plugins.jenkins.io/external-workspace-manager/

On Fri, Mar 26, 2021 at 8:00 PM eric.fetzer  wrote:

> Thanks for the response Mark..  I'm using freestyle.  Doesn't checkout to
> a subdirectory only take relative paths?
>
>
>
> Sent from my T-Mobile 4G LTE Device
>
>
>  Original message 
> From: Mark Waite 
> Date: 3/26/21 6:44 PM (GMT-05:00)
> To: Jenkins Users 
> Subject: Re: GitHub Clone to Different Local Directory
>
> If you're using pipeline, change to that directory with the
> dir('/users/username/projectname') { } wrapper around the checkout step;
>
> If you're using a freestyle job, use the git plugin extension 'checkout
> to a subdirectory'
> <https://plugins.jenkins.io/git/#checkout-to-a-sub-directory>
>
> On Fri, Mar 26, 2021 at 10:54 AM eric@gmail.com 
> wrote:
>
>> OK, so this is kind of complex so hang with me.  We're moving from
>> StarTeam to Github and I'm trying to reproduce what I'm doing in StarTeam
>> with Github.  StarTeam was easy because I owned the repository machine as
>> well as administrated the tool.  With Github, we're hosted.  So I'm admin
>> on the project but can't create an RSA Token on the machine for easy
>> access.  So I had to play around to make a personal access token work.  In
>> order to make that access token work, I had to run the checkout job on a
>> different node so that it was running as a user that lived in Github as
>> well (access token's namesake).  So when this job gets called from the
>> jenkins job, I want it to clone to the calling job's workspace
>> (/opt/jenkins/workspace/).  Well since in order to
>> authenticate, it lives in it's own shell, the workspace for this guy, and
>> where it wants to clone to, is /home//.  All that
>> for my question:  how can I specify what folder to checkout to?  I tried to
>> use "checkout to specific local branch" but it fails saying "is not a valid
>> branch name".  Well, yeah, branch is referring to branch not folder, lol.
>> In StarTeam this is easy, you just specify working folder.  Any help?
>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG6VTjt8F7Vj5pJW13VQJTfxCqRuZuDHjj5zZTa3jJ9%3Dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG6VTjt8F7Vj5pJW13VQJTfxCqRuZuDHjj5zZTa3jJ9%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/605e9199.1c69fb81.932c2.d78c%40mx.google.com
> <https://groups.google.com/d/msgid/jenkinsci-users/605e9199.1c69fb81.932c2.d78c%40mx.google.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/CAO49JtHWfuOvLQubF%2BWHBoExHugTGd_FnmEvh2fHWPMNcH08ZQ%40mail.gmail.com.


Re: GitHub Clone to Different Local Directory

2021-03-26 Thread eric.fetzer
Thanks for the response Mark..  I'm using freestyle.  Doesn't checkout to a 
subdirectory only take relative paths?Sent from my T-Mobile 4G LTE Device
 Original message From: Mark Waite  
Date: 3/26/21  6:44 PM  (GMT-05:00) To: Jenkins Users 
 Subject: Re: GitHub Clone to Different Local 
Directory If you're using pipeline, change to that directory with the 
dir('/users/username/projectname') { } wrapper around the checkout step;If 
you're using a freestyle job, use the git plugin extension 'checkout to a 
subdirectory'On Fri, Mar 26, 2021 at 10:54 AM eric@gmail.com 
 wrote:OK, so this is kind of complex so hang with me.  
We're moving from StarTeam to Github and I'm trying to reproduce what I'm doing 
in StarTeam with Github.  StarTeam was easy because I owned the repository 
machine as well as administrated the tool.  With Github, we're hosted.  So I'm 
admin on the project but can't create an RSA Token on the machine for easy 
access.  So I had to play around to make a personal access token work.  In 
order to make that access token work, I had to run the checkout job on a 
different node so that it was running as a user that lived in Github as well 
(access token's namesake).  So when this job gets called from the jenkins job, 
I want it to clone to the calling job's workspace 
(/opt/jenkins/workspace/).  Well since in order to authenticate, 
it lives in it's own shell, the workspace for this guy, and where it wants to 
clone to, is /home//.  All that for my question:  how 
can I specify what folder to checkout to?  I tried to use "checkout to specific 
local branch" but it fails saying "is not a valid branch name".  Well, yeah, 
branch is referring to branch not folder, lol.  In StarTeam this is easy, you 
just specify working folder.  Any help?  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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com.




-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG6VTjt8F7Vj5pJW13VQJTfxCqRuZuDHjj5zZTa3jJ9%3Dg%40mail.gmail.com.

-- 
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/605e9199.1c69fb81.932c2.d78c%40mx.google.com.


Re: GitHub Clone to Different Local Directory

2021-03-26 Thread Mark Waite
If you're using pipeline, change to that directory with the
dir('/users/username/projectname') { } wrapper around the checkout step;

If you're using a freestyle job, use the git plugin extension 'checkout to
a subdirectory'


On Fri, Mar 26, 2021 at 10:54 AM eric@gmail.com 
wrote:

> OK, so this is kind of complex so hang with me.  We're moving from
> StarTeam to Github and I'm trying to reproduce what I'm doing in StarTeam
> with Github.  StarTeam was easy because I owned the repository machine as
> well as administrated the tool.  With Github, we're hosted.  So I'm admin
> on the project but can't create an RSA Token on the machine for easy
> access.  So I had to play around to make a personal access token work.  In
> order to make that access token work, I had to run the checkout job on a
> different node so that it was running as a user that lived in Github as
> well (access token's namesake).  So when this job gets called from the
> jenkins job, I want it to clone to the calling job's workspace
> (/opt/jenkins/workspace/).  Well since in order to
> authenticate, it lives in it's own shell, the workspace for this guy, and
> where it wants to clone to, is /home//.  All that
> for my question:  how can I specify what folder to checkout to?  I tried to
> use "checkout to specific local branch" but it fails saying "is not a valid
> branch name".  Well, yeah, branch is referring to branch not folder, lol.
> In StarTeam this is easy, you just specify working folder.  Any help?
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com
> 
> .
>

-- 
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/CAO49JtG6VTjt8F7Vj5pJW13VQJTfxCqRuZuDHjj5zZTa3jJ9%3Dg%40mail.gmail.com.


GitHub Clone to Different Local Directory

2021-03-26 Thread eric....@gmail.com
OK, so this is kind of complex so hang with me.  We're moving from StarTeam 
to Github and I'm trying to reproduce what I'm doing in StarTeam with 
Github.  StarTeam was easy because I owned the repository machine as well 
as administrated the tool.  With Github, we're hosted.  So I'm admin on the 
project but can't create an RSA Token on the machine for easy access.  So I 
had to play around to make a personal access token work.  In order to make 
that access token work, I had to run the checkout job on a different node 
so that it was running as a user that lived in Github as well (access 
token's namesake).  So when this job gets called from the jenkins job, I 
want it to clone to the calling job's workspace 
(/opt/jenkins/workspace/).  Well since in order to 
authenticate, it lives in it's own shell, the workspace for this guy, and 
where it wants to clone to, is /home//.  All that 
for my question:  how can I specify what folder to checkout to?  I tried to 
use "checkout to specific local branch" but it fails saying "is not a valid 
branch name".  Well, yeah, branch is referring to branch not folder, lol.  
In StarTeam this is easy, you just specify working folder.  Any help?  
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/128374b8-63d5-4b8c-86bb-5f214f5e68d2n%40googlegroups.com.