opening .git/config : Permission denied

允我心安 提交于 2019-12-03 08:10:30

Thats not a folder its the main configuration file for git.

Here you can see the files for configuration

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

Permission denied under windows its a bit strange. Check the permissions of the file. Perhaps you have removed the Permissions in the extended permissions.

I'm pretty sure it's not supposed to be a folder. Delete it and let git create it.

Check Windows Security Properties

On Windows 7, I was only able to fix this by right clicking on the file in explorer, clicking properties/security tab/advanced/permissions and removing the 'deny' permission type. chmod and chown did nothing for me.

Not only .git/config is a file, but its permission must soon (Git 2.0.X/2.1, Q3 2014) not include "world writable".

See commit daa22c6 by Eric Wong

config: preserve config file permissions on edits

Users may already store sensitive data such as imap.pass in .git/config; making the file world-readable when "git config" is called to edit means their password would be compromised on a shared system.

ARUN CHAUHAN

On Windows 10, I was only able to fix this by right clicking on the file in Explorer, enter the path of config file (C:\ProgramData\Git), right clicking on config file properties/security, tab "advanced/permissions" and give full access to LogonSessionId_0_XXXXXXX (NT AUTHORITY).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!