I am trying to connect jenkins to a git repository, to trigger a build whenever any changes are committed to the repository.
Jenkins version - 2.46.3, Java version - 1.7.51, CentOS version - 6.6
My git repository is in a LAN (eg. IP - 10.0.0.1), to clone the repo, I use the below command:
git clone test@10.0.0.1:/path/to/repo
Then, the password for test
will be prompted - this properly clones the git repository.
But, when I try to connect with same credentials, IP and path with jenkins, it gives me the error as shown in the below screenshot.
There is a jenkins user in my centOS - I added the SSH key to the ~/.ssh/known_hosts
file with that user. But I'm still getting this error.
Can anyone please help on the following?
- What is this "Source Code Management" section is meant for?
- What does git tries to achieve with
git ls-remote -h
commmand? - How is the repository URL and credentials fields linked?
- Why am I getting the error shown in the screenshot?