0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【エラー解決ログ】gitlabからのfetchで行き詰った

Posted at

初学者のため、何か間違いがございましたらご指摘ください。

直面したエラー

リモートリポジトリから最新のブランチ情報を取得しようとしてgit fetchを行うと以下のようなエラーが出て上手く行かない

remote: Enumerating objects: 107, done.
remote: Counting objects: 100% (87/87), done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 60 (delta 25), reused 0 (delta 0), pack-reused 0 (from 0)
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed

解決策

  • chmod -R u+rwX .git/objects.git/objectsの権限を修正
  • sudo chown -R ユーザー名 .gitで所有者を自分のユーザーに変更

エラーになっていた原因

使用していたユーザーが.git/objectsディレクトリに対するファイルの書き込み権限を持っていなかった。
そのため、ユーザーに対して権限を付与する必要があった

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?