0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【CentOS8】Git LFSのインストール【v2.13.3】

Posted at

git lfs インストール手順

Git LFS の検証をするためにインストールする
手順を残しておく
完全にメモ用

環境

  • Cloud : Google Cloud Platform (GCP)
  • Service : Google Compute Engine (GCE)
  • OS : CentOS Stream 8
  • type : e2-standard-2 (2core 8GB)

installするもの

  • git-lfs : v2.13.3(2021/08/02 時点最新)
  • depenency : git_v2.27.0 , git-core , git-core-doc , perl-Git , perl-Error , perl-TermReadKey ←インストールされる

手順

dnf update しておく

# dnf -y update

git-lfs最新版yumrepoを取得

CentOS8のリポジトリのやつはバージョン2.11.0
最新インストールは
packagecloud.ioのRPMのinstructionに書かれてるコマンドを実行する

# curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash

すると、/etc/yum.repos.d/ に yumrepo が追加されて、gpgキーがインストールされる

[root@hoge yum.repos.d]# ls | grep git
github_git-lfs.repo

# cat github_git-lfs.repo 
[github_git-lfs]
name=github_git-lfs
baseurl=https://packagecloud.io/github/git-lfs/el/8/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/github/git-lfs/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[github_git-lfs-source]
name=github_git-lfs-source
baseurl=https://packagecloud.io/github/git-lfs/el/8/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/github/git-lfs/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

この状態でdnf install git-lfsで最新をインストールできる

dnf でインストール

# dnf install git-lfs
github_git-lfs                                                                                                   409  B/s | 833  B     00:02    
github_git-lfs-source                                                                                            405  B/s | 833  B     00:02    
Dependencies resolved.
=================================================================================================================================================
 Package                              Architecture               Version                                Repository                          Size
=================================================================================================================================================
Installing:
 git-lfs                              x86_64                     2.13.3-1.el8                           github_git-lfs                     3.2 M
Installing dependencies:
 git                                  x86_64                     2.27.0-1.el8                           appstream                          164 k
 git-core                             x86_64                     2.27.0-1.el8                           appstream                          5.7 M
 git-core-doc                         noarch                     2.27.0-1.el8                           appstream                          2.5 M
 perl-Error                           noarch                     1:0.17025-2.el8                        appstream                           46 k
 perl-Git                             noarch                     2.27.0-1.el8                           appstream                           77 k
 perl-TermReadKey                     x86_64                     2.37-7.el8                             appstream                           40 k

Transaction Summary
=================================================================================================================================================
Install  7 Packages

Total download size: 12 M
Installed size: 55 M
Is this ok [y/N]: y

...

Installed:
  git-2.27.0-1.el8.x86_64               git-core-2.27.0-1.el8.x86_64     git-core-doc-2.27.0-1.el8.noarch       git-lfs-2.13.3-1.el8.x86_64    
  perl-Error-1:0.17025-2.el8.noarch     perl-Git-2.27.0-1.el8.noarch     perl-TermReadKey-2.37-7.el8.x86_64    

Complete!

インストール確認

# git lfs --version
git-lfs/2.13.3 (GitHub; linux amd64; go 1.16.2; git a5e65851)

OK!

  • MEMO
    • gitはすでにv2.31.0が入ってたけど、dnfでインストールしたときにバージョンが下がっちゃうとかは特になかった
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?