LoginSignup
4
4

More than 5 years have passed since last update.

Jenkins + Gitbucket したら unknown option local のエラー

Last updated at Posted at 2015-05-18

そこそこハマった。

WS000197.JPG

URL は当然ですがダミーです。
こんな感じのエラーが出ました。

調べたところ、こういった文脈が。

http://stackoverflow.com/questions/23104110/unknown-option-git-config-local-reported-by-jenkins

StackOverflow
The problem was that Git was outdated, and version that comes with CentOS didn't support the --local option for git config.
Updating git to version 1.7.12 solved the issue.

当方 centos6.6 の rpm(yum) で git を入れてました。

shell
$ git --version
git version 1.7.1

古かった。。

なので、Git を make build する。

shell
$ sudo yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel
$ curl -L -O https://www.kernel.org/pub/software/scm/git/git-2.4.1.tar.gz
$ tar xfz git-2.4.1.tar.gz
$ cd git-2.4.1
$ ./configure --prefix=/usr/local/git-2.4.1
$ make
$ sudo make install

rpm はアンインストールせず、binary を差し替える方向で。
この差し替えはその他の動作互換まで確認できてませんが、こちら今のところ特に問題なく Jenkins + Gitbucket は動いてます。

shell
$ sudo ln -s /usr/local/git-2.4.1 /usr/local/git
$ sudo mv /usr/bin/git /usr/bin/git-1.7.1
$ sudo ln -s /usr/local/git/bin/git /usr/bin/git
$ git --version
git version 2.4.1

再度 Jenkins ジョブ登録を試し、当初のエラーが発生しないことを確認。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4