Jenkins - Source Code Management, credential error

7,217

Check if you have install git on the Jenkins server, and check if you have set the git executable path in the Jenkins configuration

Share:
7,217

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I have a repo on Bitbucket I'm trying to connect to my Jenkins instance. Not taking the SSH key approach here but plain id/password since communications will take place in SSL.

    (1) I double checked the id/password on both BitBucket and on Jenkins entry. I tried both scope of both Global and System.

    (2) I added a hook on Bitbucket pointing to my Jenkins instance.

    (3) Installed the proper bitbucket plugin on Jenkins.

    But I'm keep on getting

         "Failed to connect to repository : Error performing command: git ls-remote -h https://bitbucket.org/id/demo HEAD" 
    and 
    "Failed to connect to repository : Could not init /tmp/hudson4950610074146191608tmp" 
    

    I searched what both errors mean but I can't determine whether this is a credential issue.

    I'm out of clue as to how to proceed.

    Thank you.

  • user51928
    user51928 almost 9 years
    More specifically go to 'Manage Jenkins' -> 'Configure System' and check the 'Path to Git executable' field. Making sure that git was installed and that that path was correct fixed my "Failed to connect to repository : Could not init /tmp/hudson123...123tmp" error.
  • cjs
    cjs over 7 years
    on Jenkins ver. 2.7.4, the setting property of (Path to Git executable) is now in Manage Jenkins -> Global Tool Configuration -> Git -> Git Installations -> Path to Git executable.