When I do build in Jenkins, it fails with this error. Any idea?
ERROR: Error cloning remote repo 'origin' : Could not clone [email protected]:test/test.git ERROR: Cause: Error performing command: git clone --progress -o origin [email protected]:test/test.git /var/lib/jenkins/jobs/test/workspace Command "git clone --progress -o origin [email protected]:test/test.git /var/lib/jenkins/jobs/test/workspace" returned status code 128: Initialized empty Git repository in /var/lib/jenkins/jobs/test/workspace/.git/ No protocol specified (ssh-askpass:801): Gtk-WARNING **: cannot open display: :0.0 Host key verification failed. fatal: The remote end hung up unexpectedly
There are two ways to clone the project(repository) from Github. Create a new Jenkins job called 'Clone-with-https', move to the “Source Control Management” setting, and choose “Git” options if you cannot see the Git options that mean the 'GitHub' plugin wasn't installed in the Jenkins machine.
Can You Use Jenkins With GitHub? You can and should use Jenkins with GitHub to save time and keep your project up-to-date. One of the basic steps of implementing CI/CD is integrating your SCM (Source Control Management) tool with your CI tool. This saves you time and keeps your project updated all the time.
Scroll down a bit more and you'll see the Pipeline section, where we'll tell Jenkins to use the GitHub repo as the source. In the Definition dropdown, choose Pipeline script from SCM to configure the repo. For the SCM dropdown, pick Git (1), and below, in the Repository URL, type (or paste) the full GitHub repo URL.
You need to copy your private ssh key into the .ssh
folder beneath Jenkins. Something like (on Ubuntu Lucid): /var/lib/jenkins/.ssh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With