I'm on macOS Catalina, every time I use git commands I have to use sudo git $CMD
; without it the errors like unable to access '/Users/$USER/.config/git/...': Permission Denied
persists. I would like to fix this globally such that I don't have to write sudo for every repository.
Global fix:
sudo chown -R ${USER}:${GROUP} "/Users/${USER}/.config"
If there's no group,
sudo chown -R ${USER} "/Users/${USER}/.config"
Credit goes to TheDevMinerTV on Discord(CS Army) for the solution.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.