0

I am new to Jenkins, I am trying to create a Jenkins job using web client. It shows following error:

Failed to connect to repository : Command "git ls-remote -h https://user.name@atlstash.corp.bayadv/scm/qa/qa-auto-framework-selenium.git HEAD" returned status code 128: stdout: stderr: error: while accessing https://user.name@atlstash.corp.bayadv/scm/qa/qa-auto-framework-selenium.git/info/refs fatal: HTTP request failed

My STASH URL : https://user.name@atlstash.corp.bayadv/scm/qa/qa-auto-framework-selenium.git

I tried executing the same command on command prompt, its working fine. Had to fire following command before that: export GIT_SSL_NO_VERIFY=true.

My user has push/pull access right.

I have seen some using below URL, and I am confused when to use ssh tag. ssh://git@atlstash.corp.cmz/icc/adapter-derivation-individual.git

enter image description here

How can I resolve this issue?

halfer
  • 19,824
  • 17
  • 99
  • 186
amit
  • 181
  • 2
  • 4
  • 20
  • Do I need to setup my user with special rights in Jenkins so that it will appear in the credentials dropdown and I can select it then?? Currently I am using someone else's credentials on my machine to login to Jenkins. – amit Jun 14 '16 at 07:12

1 Answers1

1

clone a Git repository over SSH, you can specify ssh:// URL like this:

$ git clone ssh://user@server/project.git

Or you can use the shorter scp-like syntax for the SSH protocol:

$ git clone user@server:project.git

vaibhavnd
  • 281
  • 1
  • 5
  • Thanks Vaibhav. Do you mean to enter 'git clone user@server:project.git' in Repository URL' section? Or clone the repository outside jenkins may be from command prompt and then using the URL in Jenkins? I have already cloned the repository on my local machine. Please guide. – amit Jun 14 '16 at 23:28
  • How can I use a particular branch of the repository? – amit Jun 14 '16 at 23:29
  • "project.git" is path to git project.. reference article : https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols – vaibhavnd Jun 15 '16 at 08:13