-
I have installed git 2.7 on my centos server. and created repository at /srv/repo.git. i am able to clone this using the command
ssh://user@serverIP:/srv/repo.git
. -
I have installed jenkins & git on my local machine on Windows 10.
-
Problem:
Facing error while setup git repo with jenkins.Please see the screen-shot.
Error:
Failed to connect to repository : Command "git.exe ls-remote -h -- ssh://username@server_ip:/srv/repo.git HEAD" returned status code 128:
stdout:
stderr: ssh: Could not resolve hostname server_ip: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Please help me on this. Thanks in advance.
2
Answers
I find out the solution of this issue..there was an issue of authentication of jenkins with git server. Just resolve using below steps:
You have to exchange ‘server_ip’ with the IP of your server.
Username should to set to the correct one, too.
You said that you can clone like this
But Jenkins is trying to clone like this