4

I am trying to configure Jenkins with Bitbucket. Its almost 4 days but Jenkins not cloning with Bitbucket.

Steps I am following.

  1. Install jenkins.
  2. Install git
  3. I have account on bitbucket. created a repository called javascript which have some HTML code. Manage Jenkins -> Configure System ->In the (Git) tab -> name:Default, Path to Git executable:/usr/bin/git. as shown in bellow image. enter image description here
  4. Created a new item(jobs) in Jenkins say Hello World ->Configure-> Project name:Hello World -> Description: blalala -> Source Code Management-> git-> Repository URL :https://UserName@bitbucket.org/UserName/HelloWorld.git.
  5. Credentials: providing my Credentials.

But I am getting this error

Failed to connect to repository : Command "/usr/bin/git config --local credential.helper store --file=/tmp/git6945256026248158269.credentials" returned status code 129:
stdout:
stderr: error: unknown option `local'
usage: git config [options]

Config file location
    --global              use global config file
    --system              use system config file
    -f, --file <FILE>     use given config file

Action
    --get                 get value: name [value-regex]
    --get-all             get all values: key [value-regex]
    --get-regexp          get values for regexp: name-regex [value-regex]
    --replace-all         replace all matching variables: name value [value_regex]
    --add                 adds a new variable: name value
    --unset               removes a variable: name [value-regex]
    --unset-all           removes all matches: name [value-regex]
    --rename-section      rename section: old-name new-name
    --remove-section      remove a section: name
    -l, --list            list all
    -e, --edit            opens an editor
    --get-color <slot>    find the color configured: [default]
    --get-colorbool <slot>
                          find the color setting: [stdout-is-tty]

Type
    --bool                value is "true" or "false"
    --int                 value is decimal number
    --bool-or-int         value is --bool or --int
    --path                value is a path (file or directory name)

Other
    -z, --null            terminate values with NUL byte

Its so frustrating.tried with git hub as well. tried using ssh,and many more ways. Please Help me with this.

Aereaux
  • 845
  • 1
  • 8
  • 20
Varun
  • 4,342
  • 19
  • 84
  • 119

1 Answers1

2

It looks like you're using an older version of Git, which does not have the --local option.

According to this question the --local option was introduced in v1.7.4 in late 2010.

Please verify that the version of Git you're using on the server is more recent than at least v1.7.4, then try again. You can verify that using git --version, or git help config, then check whether the help contains a reference to the --local option.

Community
  • 1
  • 1
nwinkler
  • 52,665
  • 21
  • 154
  • 168
  • My git version is "git version 1.7.1" – Varun Jun 26 '15 at 15:14
  • There's your problem. Update Git to a more recent version > 1.7.4, and your problem should be gone. – nwinkler Jun 26 '15 at 15:18
  • When I am giving this command to install or update :yum install git Loaded plugins: product-id, refresh-packagekit, security, subscription-manager Setting up Install Process epel/metalink | 2.7 kB 00:00 epel | 4.4 kB 00:00 epel/primary_db | 6.6 MB 00:44 jenkins | 951 B 00:00 Package git-1.7.1-3.el6_4.1.x86_64 already installed and latest version Nothing to do I am getting this message . – Varun Jun 26 '15 at 15:29
  • Well, that's going to be a problem then... Please check whether there's an alternative yum repo for your distro that has a more recent version of Git. – nwinkler Jun 26 '15 at 15:44
  • Sorry for being dumb could you please tell me how do I do that – Varun Jun 26 '15 at 15:51
  • i updated my git version from 1.7.1 to 1.9.4 now when i am giving git url ,Still I am getting the this error. kelp me bro.. Error : Failed to connect to repository : Error performing command: /usr/bin/git ls-remote -h https://github.com/UserName/Test.git HEAD – Varun Jun 29 '15 at 07:58
  • Looks like you got your answer here: http://stackoverflow.com/questions/31109227/why-my-git-is-not-updating-from-1-7-1-to-1-9-4 – nwinkler Jun 29 '15 at 08:58
  • no it was just for updating git. As u recommended to update the git so . i did it. but still I am getting the error – Varun Jun 29 '15 at 09:06
  • Did you restart Jenkins so it can pick up the new Git binary and Path setting? – nwinkler Jun 29 '15 at 09:10
  • my git is installed in -> /usr/src/git-1.9.4 , under git-1.9.4 it has bin-wrappers. so at my git executable path should i put this /usr/src/git-1.9.4/bin-wrappers or this /usr/src/git-1.9.4. i tried both. still I am having this issue – Varun Jun 29 '15 at 09:29