Reputation: 33
this is my pipeline script:
pipeline {
agent any
stages {
stage('MVD python') {
steps {
git url: 'ssh://[email protected]:7999/lg6/mvdzos.git',
credentialsId: 'edawes',
branch: 'master'
sh 'ls -l'
}
}
}
}
simply trying to test if i can get access to the repo however I am getting the error
Fetching upstream changes from ssh://[email protected]:7999/lg6/mvdzos.git
git --version # timeout=10 git fetch --tags --progress ssh://[email protected]:7999/lg6/mvdzos.git +refs/heads/:refs/remotes/origin/ ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git fetch --tags --progress ssh://[email protected]:7999/lg6/mvdzos.git +refs/heads/:refs/remotes/origin/" returned status code 128: stdout: stderr: Host key verification failed. fatal: Could not read from remote repository.
beyond the obvious access rights issue which I am pretty sure I have, what else could the problem be?
Upvotes: 0
Views: 12644
Reputation: 5149
On all Jenkins nodes where this would be probably running (that is all including the master if it has some executors configured) you'll need to make sure to have a working ssh configuration.
In particular it tells you that there's some issue with the host key verification. Logon to that machine and check whether. While playing around on that machine you may use ssh [email protected]:7999
to see whether you fixed the issue.
~/.ssh/config
) but there's no host key given in ~/.ssh/known_hosts
Upvotes: 0
Reputation: 5660
This part of the error:
stderr: Host key verification failed
is what's going on here - your Jenkins can't confirm that git.rocketsoftware.com:7999
is legitimate, so it's bailing on the whole procedure.
Does Jenkins have a known_hosts file you can add that server to?
Upvotes: 0
Reputation: 6781
Try to execute the git command that causes to error on the Jenkins server as the Jenkins user.
git fetch --tags --progress ssh://[email protected]:7999/lg6/mvdzos.git
You might get an SSH warning which you have to confirm manually.
Upvotes: 0