问题
I having this problem because when I run flutter doctor it says . btw I'm using mac os
Failed to find the latest git commit date: VersionCheckError: Command exited
with code 128: git -c log.showSignature=false log -n 1 --pretty=format:%ad
--date=iso
Standard out:
Standard error: warning: unable to access '.git/config': Permission denied
fatal: unable to access '.git/config': Permission denied
I ask this question in this link but one person said that I should check the user and I see that I'm the user registered there. I think I need to go to git folder and allow permission in properties but I don't know to get into git folder in mac os
回答1:
The .config folder is supposed to be owned by the user. It appears that the ownership got changed to system by mistake on your machine.
With following command, you can restore the default permission on your MacOS:
sudo chown -R <username> .config
(Substitute <username>
with your username. You can find your username as follows: whoami
)
When prompted for a password, enter your login password.
来源:https://stackoverflow.com/questions/61811373/how-to-allow-the-access-of-git-config-in-mac-os