未知选项git config –local由Jenkins报告

我在堆栈溢出问同样的问题,但我只有5个意见,我认为这是一个更好的论坛这个问题。

我正在为github上托pipe的C#项目设置一个私人回购。 Git安装在主CentOS机器上,从机窗口上安装MSBuild。

我在github上创build了帐户,并将其添加到我的私人回购。 当我在Jenkins上设置源代码控制时,我input了URL(如https://github.com/…/repo.git )并使用新帐户input了凭据。

jenkins报道:

Failed to connect to repository : Command "git config --local credential.helper store --file=/tmp/git2956041026506359040.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 

如果我login到主,并在根控台上尝试相同的命令,我得到同样的错误, – 本地不是一个选项的gitconfiguration。

CentOS 6(我正要在这里假设版本6)正在发布git版本1.7.1。
--local版本中引入了--local开关。
因此它在您使用的版本中不可用。