jenkins failed to connect to remote bit bucket repository jenkins failed to connect to remote bit bucket repository jenkins jenkins

jenkins failed to connect to remote bit bucket repository


Change repository address to this format:

https://user:password@bitbucket.org/user/project_name.git

And of course:

  • user - your bitbucket user,
  • password- your bitbucket password,
  • project_name - name of project/repo,


In Jenkins ver. 2.6 just use

https://user@bitbucket.org/user/project_name.git 

And add your credentials.

enter image description hereImportant: Make sure that your git installed version is greater or equals than 1.7.4 because of the --local issue.

If you are on CentOS maybe you face the same problem than me. Here is a great answer from @AmirHd to upgrade git version on CentOS, if you already have git installed just type:

yum --disablerepo=base,updates --enablerepo=rpmforge-extras update git

Hope this helps!!!


I personnaly use that structure :

git@CREDENTIALS:BUCKET_TEAM/BUCKET_REPO.git

Questions :How many credentials do you have ?If you have more than one, you should clearly setup them within your server

Be carefull ! Jenkins when adding SSh keys DOES NOT accept passphrases

check your ssh keys within $HOME/.ssh/config and $HOME/.ssh/know_host of jenkins user (if jenkins is a service) or your application server user

One last point, YOU MUST first login with your jenkins user using SSH before enabling jenkins sync with git with a ssh git@bitbucket.org