LoginSignup
1
1

More than 5 years have passed since last update.

Gitlab8.3.2でlfsができねー(更新8.15.3で出来た)

Last updated at Posted at 2016-01-02

大容量の動画やPSDファイルをgitリポジトリーと別管理できるlfsが、gitlabにも対応したよというから
やってみたら、できん。

とりあえず適当なリモートリポジトリーを作成して

・ローカルにcloneする。
・ローカルの該当ディレクトリーのターミナルから

git lfs install
git lfs track "*.mp4"

mp4ファイルを作業ディレクトリに追加。

後はいつものお決まりのコマンド

git add .
git commit -m "動画追加"
git push

以下ERROR

Git LFS: (2 of 1 files) 17.85 MB / 8.93 MB ← 何故か2個アップ
Repository or object not found: http://./group/lfs.git/gitlab-lfs/objects/2e79049717e1623c6487bb778137571664a4ea5162617d068eea5fe19656c147/9359861
Check that it exists and that you have proper access to it

error: failed to push some refs to 'ssh://git@./group/lfs.git'

何回かやったが意味がわからんから
あきらめる

.git/config

[lfs] url = http://./group/lfs.git/info/lfs
access = basic
[lfs "http://./group/lfs.git/info/lfs"] ←git push すると見に覚えのない設定が勝手に追加される
access = basic

環境
ローカル
Mac OS 10.11.2
git version 2.6.4
git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1)
リモート
GitLab Community Edition 8.3.2

参考
https://github.com/github/git-lfs
http://qiita.com/kiida/items/0d51c43ac73f14f09f5a

【追記】また挑戦してみた 2017.1.12

まず最初にapacheでリバースプロキシーをかけて
既存nginxで稼働させていたのだが、そこが原因かもしれないと考え
内蔵nginxに変更してみた。

環境
ローカル
Mac OS 10.12.2
git version 2.11.0
git-lfs/1.5.4 (GitHub; darwin amd64; go 1.7.4)
gitlab 8.15.3

・ローカルにcloneする。
・ローカルの該当ディレクトリーのターミナルから

git lfs install (lfsインストール)
git lfs track "*.mp4" (対象ファイルをセット)

git add .
git commit -m "動画追加"
git push

アップされた。

(2)他のディレクトリーにクローンしてみるがエラーがでて、lfs管理ファイルが落とせない

git clone ssh://****/lfstest.git

Cloning into 'lfstest'...
WARNING: Git LFS is using a deprecated API, which will be removed in v2.0.
Consider enabling the latest API by running: git config lfs.batch true.
Error downloading object: video.mp4 (2e79049717e1623c6487bb778137571664a4ea5162617d068eea5fe19656c147)
省略
エラーがでた

(3)SMUGGEオプションをつけてみる

GIT_LFS_SKIP_SMUDGE=1 git clone ssh://****/lfstest.git

[http://www.slideshare.net/hibiki443/git-git-lfs-60951449]

落とせた。
ファイル内容はハッシュポイントファイルだけお

-rw-r--r-- 1 **** **** 325263 1 12 00:32 gakusei.png
-rw-r--r-- 1 **** **** 132 1 12 00:32 video.mp4 (容量が小さいテキストポインターだけ)

git lfs fetch(lfsファイルの最新情報を落とす) エラー

Fetching master
WARNING: Git LFS is using a deprecated API, which will be removed in v2.0.
Consider enabling the latest API by running: git config lfs.batch true.
Git LFS: (0 of 1 files) 0 B / 8.93 MB
http: Server supports batch API only, please update your Git LFS client to version 1.0.1 and up.
Docs: https://***/help
Warning: errors occurred

エラー対処

(4)git config lfs.batch true

git lfs fetch(lfsファイルの最新情報を落とす) リトライ

Fetching master
Git LFS: (1 of 1 files) 8.92 MB / 8.93

成功

git lfs pull(本体をpull)
成功

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