Answers for "fatal: could not open '.git/COMMIT_EDITMSG': Permission denied"

0

fatal: could not open '.git/COMMIT_EDITMSG': Permission denied

// In Windows OS
1. If you are using Windows and you are stuck with any Git permission issues, 
make sure your (local) repository's .git folder contents are not marked as 
hidden.

// Linux
1. 
This is not an error message from the remote Git repository, this is a problem 
with your local files. You probably used git (or rake) as another user 
(such as root) in this same directory, and it created files which you now 
can't overwrite.

Simply use chown to change the ownership of the files to your current user, 
for instance:

$ chown -R $(whoami) .
Posted by: Guest on September-17-2021

Code answers related to "fatal: could not open '.git/COMMIT_EDITMSG': Permission denied"

Browse Popular Code Answers by Language