I am using RedHat Linux
BitBucket
say Demo and I have
some HTML
code into that.Jenkins
on my system.What I am trying to do is clone the BitBucket
repository with Jenkins
so that I will be able to build the project.
Steps what I am following is
Jenkins
.git
and Jenkins
ask for repository URL, and I am giving this URL.
but Jenkins
throwing an error saying:
Failed to connect to repository : Error performing command: git ls-remote -h git clone https://[email protected]/UserName/java-script.git HEAD
I spent around 3 days and could not configure this instead learned a lot about Jenkins
.
I have also tried the BitBucket
plug-in for Jenkins
that also was not working.
Configure your Jenkins job with Bitbucket repository details Configure Bitbucket Repository under Source Code Management, along with credentials. 3. Verify your Jenkins configuration looks ok 4. Configure a Webhook on Bitbucket On Bitbucket, go to Settings — Webhook — Add Webhook.
Please go to Manage Jenkins-> Configure System Settings. Check for git section and add correct path. Its already seems that you have removed the Git Clone from the URL provided by Bitbucket. You can find this setting under Global tool configuration.
Bitbucket provides different features to developers to make easy development. The clone is one of the features that Bitbucket provides. When we try to clone a repository at that time, we need to create a copy of the Bitbucket repository on our local machine.
When you clone a repository, you create a copy of your Bitbucket repository on your local system. Cloning also connects the remote and local repositories so that you can start pushing and pulling changes between both places. You can use the terminal, SourceTree, or any other client you'd like to clone your Git repository.
For Jenkins 1.5 or greater( till 1.6)
The error you are getting because in the global configuration of Jenkins, the git path is not correct/or not inserted.
That's why Jenkins is unable to run the git command.
Please go to Manage Jenkins-> Configure System Settings
. Check for git section and add correct path.
Its already seems that you have removed the Git Clone from the URL provided by Bitbucket.
Update:
For Jenkins 2.0 or above
You can find this setting under Global tool configuration.
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