我正在私人仓库中为GitHub上托管的C#项目设置CI.
Git安装在主CentOS机器上,MSBuild安装在从属窗口上.
我在GitHub上创建了帐户,并将其添加到我的私人仓库中.
当我在Jenkins上设置源代码管理时,我输入了URL(as https://github.com/.../repo.git
)并使用新帐户输入了凭据.
詹金斯报道:
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, --fileuse 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 find the color configured: [default] --get-colorbool 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
如果我登录master
并在根控制台上尝试相同的命令我得到相同的错误,--local
不是一个选项git config
.
问题是Git已经过时了,CentOS附带的版本不支持git config的--local选项.
将git更新到版本1.7.12解决了这个问题.