How to resolve git error: Unable to append to .git/logs/refs/remotes/origin/master: Permission denied
It appears git
was run locally as root
, thus changing the ownership on some of the files tracking the location of the origin
branch.
Fixing the file ownership should resolve the issue:
# run this from the root of the git working tree
sudo chown -R "${USER:-$(id -un)}" .
Reference: Stackoverflow