Git Plugin - How specify use ssh in "Repository URL" ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Git Plugin - How specify use ssh in "Repository URL" ?

Ed of the Mountain
What I Tried:

1) Set Source Code Management > GIT > Repository URL to:

[hidden email]:v3/acmeinc/my-app/my-app

Failed to connect to repository : Command "git ls-remote -h -- [hidden email]:v3/acmeinc/my-app/my-app HEAD" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.

Work-Around

My work-around was to change job to use a bash shell. 

However, I very much miss the "Recent Changes" section that was displayed in my job previously. 

I *think* the "Recent Changes" were generated from the GIT Plugin.



echo "git clone using public SSH key of build slave..."
echo "Works but no 'Recent Changes' section for your job"
git clone [hidden email]:v3/acmeinc/my-app/my-app .

Thanks in advance for any tips or suggestions,

-Ed



--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKas9SQ8MdJud0Wsu6tR8%3DvkeYevVrZseMyYuUWMNfYqsvRxFA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Git Plugin - How specify use ssh in "Repository URL" ?

Mark Waite-2

On Tue, Jan 21, 2020 at 10:24 AM Eddie Sutton <[hidden email]> wrote:
What I Tried:

1) Set Source Code Management > GIT > Repository URL to:

[hidden email]:v3/acmeinc/my-app/my-app

Failed to connect to repository : Command "git ls-remote -h -- [hidden email]:v3/acmeinc/my-app/my-app HEAD" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.


That message is a "permission denied" message.  It could be for many different reasons, possibly including:
  1. Failed to provide a private key credential in the Jenkins job definition.  Use the Jenkins credentials plugin to add the private key which has also been registered with visualstudio.com
  2. Failed to register the public key with visualstudio.com.  Add the public key from the private key credential to the repository on visualstudio.com
  3. Used an outdated command line git version.  Use a recent command line git version instead
  4. Used command line git from cygwin instead of using git for windows.  The git plugin is not tested with cygwin.  It is tested frequently with recent releases of git for windows.  Use git for windows instead of cygwin
 
Work-Around

My work-around was to change job to use a bash shell. 

However, I very much miss the "Recent Changes" section that was displayed in my job previously. 

I *think* the "Recent Changes" were generated from the GIT Plugin.



echo "git clone using public SSH key of build slave..."
echo "Works but no 'Recent Changes' section for your job"
git clone [hidden email]:v3/acmeinc/my-app/my-app .

Thanks in advance for any tips or suggestions,


You're welcome to use your own 'git clone' inside the job definition, though that removes many of the things that Jenkins could do for you and makes it more difficult for you to use additional agents.  Each agent will need the same private key credentials.

 
-Ed



--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKas9SQ8MdJud0Wsu6tR8%3DvkeYevVrZseMyYuUWMNfYqsvRxFA%40mail.gmail.com.


--
Thanks!
Mark Waite

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGSqYXnuyr-QMJjbzORzqZKoc8pdc2FyOuDV3s7%2BeEheg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Git Plugin - How specify use ssh in "Repository URL" ?

Ed of the Mountain
Thank you for the advice Mark.

I would be fine using 'git clone', except I hate missing the "Recent Changes' that I believe was generated because I used the Jenkins git plugin.

I will keep working on it.  Thanks again.

-Ed

On Tuesday, January 21, 2020 at 3:12:32 PM UTC-6, Mark Waite wrote:

On Tue, Jan 21, 2020 at 10:24 AM Eddie Sutton <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="YXtcmEHVDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">edsu...@...> wrote:
What I Tried:

1) Set Source Code Management > GIT > Repository URL to:

[hidden email].com:v3/acmeinc/my-app/my-app

Failed to connect to repository : Command "git ls-remote -h -- [hidden email].com:v3/acmeinc/my-app/my-app HEAD" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.


That message is a "permission denied" message.  It could be for many different reasons, possibly including:
  1. Failed to provide a private key credential in the Jenkins job definition.  Use the Jenkins credentials plugin to add the private key which has also been registered with <a href="http://visualstudio.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fvisualstudio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEiLjCa0D6xOfrAXXdHp-xsA9Uyig&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fvisualstudio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEiLjCa0D6xOfrAXXdHp-xsA9Uyig&#39;;return true;">visualstudio.com
  2. Failed to register the public key with <a href="http://visualstudio.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fvisualstudio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEiLjCa0D6xOfrAXXdHp-xsA9Uyig&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fvisualstudio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEiLjCa0D6xOfrAXXdHp-xsA9Uyig&#39;;return true;">visualstudio.com.  Add the public key from the private key credential to the repository on <a href="http://visualstudio.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fvisualstudio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEiLjCa0D6xOfrAXXdHp-xsA9Uyig&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fvisualstudio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEiLjCa0D6xOfrAXXdHp-xsA9Uyig&#39;;return true;">visualstudio.com
  3. Used an outdated command line git version.  Use a recent command line git version instead
  4. Used command line git from cygwin instead of using git for windows.  The git plugin is not tested with cygwin.  It is tested frequently with recent releases of git for windows.  Use git for windows instead of cygwin
 
Work-Around

My work-around was to change job to use a bash shell. 

However, I very much miss the "Recent Changes" section that was displayed in my job previously. 

I *think* the "Recent Changes" were generated from the GIT Plugin.



echo "git clone using public SSH key of build slave..."
echo "Works but no 'Recent Changes' section for your job"
git clone [hidden email].com:v3/acmeinc/my-app/my-app .

Thanks in advance for any tips or suggestions,


You're welcome to use your own 'git clone' inside the job definition, though that removes many of the things that Jenkins could do for you and makes it more difficult for you to use additional agents.  Each agent will need the same private key credentials.

 
-Ed



--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="YXtcmEHVDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/CAKas9SQ8MdJud0Wsu6tR8%3DvkeYevVrZseMyYuUWMNfYqsvRxFA%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/CAKas9SQ8MdJud0Wsu6tR8%3DvkeYevVrZseMyYuUWMNfYqsvRxFA%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/CAKas9SQ8MdJud0Wsu6tR8%3DvkeYevVrZseMyYuUWMNfYqsvRxFA%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/CAKas9SQ8MdJud0Wsu6tR8%3DvkeYevVrZseMyYuUWMNfYqsvRxFA%40mail.gmail.com.


--
Thanks!
Mark Waite

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/492fe750-2014-4958-b145-3fc69cbcb3fc%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Git Plugin - How specify use ssh in "Repository URL" ?

Björn Pedersen
In reply to this post by Ed of the Mountain
HI,

that is a hostkey verifiicaction error. Solution:
 
a) manually install the hostkey on the build agent
b) configure ssh to skip hostkey verification (the more insecure option)

Björn

Am Dienstag, 21. Januar 2020 18:24:55 UTC+1 schrieb Ed of the Mountain:
What I Tried:

1) Set Source Code Management > GIT > Repository URL to:

[hidden email].com:v3/acmeinc/my-app/my-app

Failed to connect to repository : Command "git ls-remote -h -- [hidden email].com:v3/acmeinc/my-app/my-app HEAD" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.

Work-Around

My work-around was to change job to use a bash shell. 

However, I very much miss the "Recent Changes" section that was displayed in my job previously. 

I *think* the "Recent Changes" were generated from the GIT Plugin.



echo "git clone using public SSH key of build slave..."
echo "Works but no 'Recent Changes' section for your job"
git clone [hidden email].com:v3/acmeinc/my-app/my-app .

Thanks in advance for any tips or suggestions,

-Ed



--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ce6ffb2d-5c40-479e-9fc8-fffdba4d5e1e%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Git Plugin - How specify use ssh in "Repository URL" ?

vince bailey
Hi all,

You may need to make sure you have a user name and login to your git repo and 
1. login to github using your account. 
or 
create a access token in git hub and use the token which is the way i did it.


On 23 Jan 2020, at 10:52, 'Björn Pedersen' via Jenkins Users <[hidden email]> wrote:

HI,

that is a hostkey verifiicaction error. Solution:
 
a) manually install the hostkey on the build agent
b) configure ssh to skip hostkey verification (the more insecure option)

Björn

Am Dienstag, 21. Januar 2020 18:24:55 UTC+1 schrieb Ed of the Mountain:
What I Tried:

1) Set Source Code Management > GIT > Repository URL to:

[hidden email].com:v3/acmeinc/my-app/my-app

Failed to connect to repository : Command "git ls-remote -h -- [hidden email].com:v3/acmeinc/my-app/my-app HEAD" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.

Work-Around

My work-around was to change job to use a bash shell. 

However, I very much miss the "Recent Changes" section that was displayed in my job previously. 

I *think* the "Recent Changes" were generated from the GIT Plugin.



echo "git clone using public SSH key of build slave..."
echo "Works but no 'Recent Changes' section for your job"
git clone [hidden email].com:v3/acmeinc/my-app/my-app .

Thanks in advance for any tips or suggestions,

-Ed




--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ce6ffb2d-5c40-479e-9fc8-fffdba4d5e1e%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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0A4E7BB0-82F4-4B9B-ADBE-FBDA96B51FC3%40dns-direct.com.