LoginSignup
3
3

More than 5 years have passed since last update.

ubuntu 14.04 の git を2.7.4に更新する

Last updated at Posted at 2016-03-18

gitに重大な脆弱性

git に重大な脆弱性が発見されたということで、gitlabサーバーのgitのバージョンを更新しました。

Ubuntu 14.04 の git のバージョンをチェック

まずはgitのバージョンをチェック

$ git --version
git version 1.9.1

gitlabサーバーのOSは Ubuntu 14.04LTS で git のバージョンは 1.9.1 ですからすぐにでも更新が必要。

Ubuntuのリポジトリからは更新はきていないもよう

$ sudo aptitude update
$ sudo aptitude upgrade
The following packages will be upgraded:
  biosdevname gitlab-ce ifupdown libnuma1 usbutils
5 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 267 MB of archives. After unpacking 389 kB will be used.
Do you want to continue? [Y/n/?] n
Abort.

ubuntu 14.04 の git を最新版に更新

GITの公式PPAを使用します。

$ sudo add-apt-repository ppa:git-core/ppa
 The most current stable version of Git for Ubuntu.

For release candidates, go to https://launchpad.net/~git-core/+archive/candidate .
 More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpmsypfa2i/secring.gpg' created
gpg: keyring `/tmp/tmpmsypfa2i/pubring.gpg' created
gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpmsypfa2i/trustdb.gpg: trustdb created
gpg: key E1DF1F24: public key "Launchpad PPA for Ubuntu Git Maintainers" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
$ sudo aptitude update
$ sudo aptitude upgrade git
Resolving dependencies...
The following packages will be upgraded:
  git git-man
2 packages upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 5,295 kB of archives. After unpacking 4,781 kB will be used.
Do you want to continue? [Y/n/?]
$ git --version
git version 2.7.4

無事 2.7.4 に更新できました。

gitlabサーバーはシステムのgitを使用していませんでした。

gitlabサーバーはominibusインストールなのでシステムのgitを更新しただけではだめでした><
gitlabに組み込みのgitが使用されています。

素直に gitlab 8.5.7 に更新しました。

3
3
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
3
3