Skip to content

Instantly share code, notes, and snippets.

@nielk
Created January 21, 2014 11:03
Show Gist options
  • Save nielk/8538092 to your computer and use it in GitHub Desktop.
Save nielk/8538092 to your computer and use it in GitHub Desktop.
Git : failed to write object .git/objects error preprod

MISE EN PRE/PROD ERREURS

error: insufficient permission for adding an object to repository database .git/objects

fatal: failed to write object
fatal: unpack-objects failed

solutions

Vérifier les droits dans ./git

ls -la .git

puis changement des droits et owner :

chmod 775 .git -R

chown webuser:www-data .git -R

vim .git/config

filemode = false

explications

1 = execution
2 = ecriture
4 = lecture


7 = 4 + 2 + 1
5 = 4 + 1

les droits sont sur le modèle user - group - other

donc user = 7 ; group = 7 ; other = 5

option -R : mode récursif

ressource wikipedia/chmod

ressource wikipedia/chown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment