Software⏱️ 3 min read📅 2026-06-04

How to Fix: Error while pull from git - insufficient permission for adding an object to repository database .git/objects

Git permission error when pulling from repository.

Quick Answer: Check the git permissions and run 'git config --global user.name "Your Name"' and 'git config --global user.email "your_email@example.com"

The error 'insufficient permission for adding an object to repository database .git/objects' occurs when the Git repository's permissions are set too restrictive, preventing the Git client from writing objects to the repository's database. This issue affects users who have been granted read-only access to a repository without write permissions.

This error can be frustrating as it prevents the user from successfully pulling changes from the remote repository. Fortunately, there are several methods to resolve this issue and regain write access to the repository.

💡 Why You Are Getting This Error

  • The primary reason for this error is that the Git client lacks write permissions to the repository's database. This can happen when a user is granted read-only access to a repository without explicit write permissions.
  • An alternative cause could be a misconfigured Git configuration or an issue with the repository's file system permissions.

🔧 Proven Troubleshooting Steps

Changing Repository Permissions

  1. Step 1: Open the terminal and navigate to the repository directory. Type 'git config --local user.name ' and press Enter.
  2. Step 2: Type 'git config --local user.email ' and press Enter.
  3. Step 3: Run the command 'chmod -R u+w .git' to change the file permissions of the Git repository's database directory.
  4. Step 4: Once the permission changes take effect, try pulling the changes again using 'git pull origin develop'.

Resetting Git Configuration

  1. Step 1: Open the terminal and navigate to the repository directory. Type 'git config --local --delete user.name' and press Enter.
  2. Step 2: Type 'git config --local --delete user.email' and press Enter.
  3. Step 3: Run the command 'git remote set-url origin ' if your Git URL has changed.

💡 Conclusion

To resolve the error 'insufficient permission for adding an object to repository database .git/objects', try changing the repository permissions or resetting your Git configuration. If you have been granted read-only access, contact your system administrator to request write permissions. Remember to always check your file system permissions and Git configuration before attempting any troubleshooting steps.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions