0
votes

I am trying to connect bitbucket Git repository in Jenkins. I created repository and added two files.

I can see two choices, HTTPS SSH

In my system, I am able to clone my repository by below command,

git clone https://[email protected]/keval1234patel/repo1.git

The problem is, When I give same url in Jenkins, it shows below error,

Jenkin error

One more thing I noticed is, In my bitbucket, I don't see clone option as I can see in other articles, I see like below,

HTTPS url

When I try to brows URL, it shows me 404 error, But same URL is working for clone repository in local system, I unchecked "This is a private repository" checkbox as well. 404

Where do I need to change to integrate my git repository with Jenkins?

1
Is it a private repositoryArpit Solanki
No, In settings I unchecked "This is a private repository" checkbox.Keval Patel
I can access you repository with the link https://bitbucket.org/keval1234patel/repo1.git so I'm not totally sure why you have a dead link What appends if you use this link in your jenkins ?sheplu
The URL for browsing code in bitbucket will be different than for cloning. Check the projects/repos available first.ILMostro_7
Ok, may be it was browser issue for giving 404 error, But still Jenkins showing same error in other browsers as well.Keval Patel

1 Answers

0
votes

Those, who may have same issue, Need to set git.exe path in Jenkins configuration.

While going in the project--> Configure--> set the path of the git correctly.
It should be till the bin and then append git.exe like *\bin\git.exe

In my case, it is

C:\Program Files\Git\bin\git.exe