Ubuntu under git commit error insufficient permission for adding a object to repository database. Git/objects Error Resolution

Source: Internet
Author: User

When prompted, you know it is a permission issue,

Use the following command to query for files with root permissions under Objects
LL. git/objects/| grep root

Drwxr-xr-x 2 root root 4096 March 1 21:40 3d
Drwxr-xr-x 2 root root 4096 March 1 21:40 5c

Some files do exist with root permissions

Switch to the root user and change the corresponding directories back to the corresponding owners and user groups:

Switch to root permissions,

Su

Validation failure may be prompted for the first time

You can add a password now

sudo passwd

OK to switch back to root right after

Su

Chown-r Fu:fu. git/objects/

Note that FU is a group user

Quit root and re-commit successfully

Ubuntu git commit error insufficient permission for adding a object to repository database. Git/objects Error Resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.