Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configure git repository in jenkins

I'm trying to configure the repository: https://github.com/javpaw/game-of-life

into a job in jenkins using git plugin, but when I put the address of the repository: [email protected]:javpaw/game-of-life.git

Source Code Management -> git -> repository Url I got this error:

Failed to connect to repository : Command "/usr/bin/git ls-remote -h [email protected]:javpaw/game-of-life.git HEAD" returned status code 128: stdout: stderr: No protocol specified No protocol specified

(ssh-askpass:18881): Gtk-WARNING **: cannot open display: :0.0 Host key verification failed. fatal: The remote end hung up unexpectedly

I found this question here in github: Why Git fail to connect to local repository with Jenkins (bad config file)?

but was not useful because I'm using Ubuntu 12.04

How can I solve this issue?

thanks.

like image 368
javier Avatar asked Sep 27 '12 05:09

javier


People also ask

How do you configure Git in Jenkins?

Go to Jenkins dashboard, click on “Manage Jenkins.” Now follow these steps- Manage Plugins -> 'Available' tab -> Enter Git in search bar and filter -> Install required plugin. After the installation, all you need to do is click on “Configure System” and go to the 'GitHub' section.

How do I add a Git repo to Jenkins pipeline?

To create your Pipeline project for a Git repository, click the Git button under Where do you store your code? In the Connect to a Git repository section, enter the URL for your Git repository in the Repository URL field. You now need to specify a local or a remote repository from which to build your Pipeline project.

How do I use Git credentials in Jenkins pipeline?

To understand how to configure credentials in a Jenkins environment: Using Credentials. gitToolName. Name of the git installation in the machine running the Jenkins instance (Check Global Tool Configuration section in Jenkins UI)

How do I clone a Git repository using Jenkins?

Configuring Git with Jenkins Now open your project and go to configure. Step 2: Give the repository Url in Source Code Management, repository Url can be fetched by clicking on clone and download option of Github and you have to select the SSH Url. Also, add credentials there of Jenkins.


1 Answers

Try using a complete url, with https rather than ssh:

https://github.com/javpaw/game-of-life

You can also try the read-only address:

git://github.com/javpaw/game-of-life.git

But in both case, the important part is that you specify the protocol (https:// or git://)

like image 199
VonC Avatar answered Sep 20 '22 18:09

VonC