Jenkins couldn't clone GIT repository (MacOS X 10.8.2)
System: MacOS, standard Jenkins installation.
I can clone repository from my user. But Jenkins – can’t neither from Git, not from GitHub (my key is added to Git and GitHub). I receive: “stderr: Host key verification failed.”
I’ve copied my key into /Users/Shared/Jenkins/.ssh – but still no luck 🙁 Maybe I’ve copied it to incorrect place?
Generate ssh key from Jenkins is not an option for me.
- Implement .gitignore behavior in a shell script?
- Could not read from remote repository. SwiftyDropbox
- How to handle accented characters in file names in Git on Mac OS X converted to unicode
- .git/config file reads “command not found”
- Is it possible to view git diffs using a GUI side-by-side tool on Mac?
- How to setup Git on a Mac with Windows 8 running in Parallels
What am I doing wrong? Thanks in advance!
2 Solutions collect form web for “Jenkins couldn't clone GIT repository (MacOS X 10.8.2)”
This is usually related to permissions, as Jenkins’ process runs as user ‘jenkins’.
See here: How to run jenkins as a different user –
especially the answers of Sagar and Peter Tran .
Like the error says, the problem (at least first) is with host key verification. The first time you connect to an ssh server, ssh client will prompt you to check and accept the host key. (Of course no-one does that, so I don’t know why it bothers…)
sudo -u jenkins -i
and then reply to the prompt. Alternatively you can disable host key checking. Look up StrictHostKeyChecking in man ssh_config.