Opening .git / config: permission denied

C:\Users\Inspiron\.git\config folder is empty, and the $git config user.email user@gmail.com command returns an error: opening .git / config: permission denied. I am trying to set the size of the mail buffer, but I get the same error.

+7
git git-branch
source share
5 answers

This is not a folder, its main configuration file for git.

Here you can see the files for configuration

http://git-scm.com/docs/git-config

The resolution rejected under the windows is a bit strange. Check file permissions. You may have deleted permissions in extended permissions.

0
source share

I am sure this is not a folder. Delete it and let git create it.

+4
source share

Check Windows Security Properties

In Windows 7, I was able to fix this by right-clicking on the file in Explorer, clicking on properties / security tab / advanced / permissions and deleting the permission type “deny”. chmod and chown did nothing for me.

+2
source share

Not only .git/config is a file, but its resolution should soon (Git 2.0.X / 2.1, Q3 2014) not include "write-only".

See fix daa22c6 by Eric Wong

config : save permissions on configuration files when editing

Users can already store sensitive data, such as imap.pass in .git/config ; making the file readable when " git config " is called for editing means that their password will be compromised on the common system.

0
source share

In Windows 10, I was able to fix this by just right-clicking the file in Explorer, enter the path to the configuration file ( C:\ProgramData\Git ), right-clicking the properties/security the configuration file, the "Advanced / Permissions " tab and giving full access to LogonSessionId_0_XXXXXXX (NT AUTHORITY) .

0
source share

All Articles