git cannot open .git/FETCH_HEAD git cannot open .git/FETCH_HEAD git git

git cannot open .git/FETCH_HEAD


This worked with me

sudo chown -R $(whoami) .git/


error: cannot open .git/FETCH_HEAD: Permission denied

Was one of the first errors that ever happened to me.

Perhaps you already knew, but this is possibly happening because of not having permissions for changing/viewing that directory.

The idea is to change the permissions, perhaps use:

chmod

or

chown

I found further answers here Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied.


if you are using ubuntu, use sudo key word before.

sudo git pull

if you are using windows, use administrator mode