LoginSignup
0
0

More than 1 year has passed since last update.

git pullしたら.git/index.lock' write error. Out of diskspaceエラーが出る

Last updated at Posted at 2023-04-17

EC2でpullしたときのこと。

エラー内容

$ git pull origin main

fatal: sha1 file '/var/www/movie-review/.git/index.lock' write error. Out of diskspace

見たことないエラーが出る。エラー文でググってみてもそれっぽいサイトは出てこない。

原因

翻訳サイトでエラー文を和訳してみたら

fatal: sha1 file '/var/www/movie-review/.git/index.lock' write error. Out of diskspace
↓(和訳)
致命的: sha1 ファイル '/var/www/movie-review/.git/index.lock' 書き込みエラー。 ディスク容量が不足しています

ディスク容量が不足しているとのこと。

解決法

一旦イメージなどを全部削除してしまえば、容量が復活すると思いますので
下記を実行して、docker関連のimageを全削除してからpullすればOKです。

$ docker-compose down
$ docker image prune -a
$ docker volume prune
$ docker system prune

$ git pull origin main

の手順を行ったら無事pullできました!
no space left on deviceと同じようなエラー内容なんですかね。。

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