how to allow the access of git/config in mac os?
1,971
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.
Author by
Ken Verganio
Updated on December 20, 2022Comments
-
Ken Verganio over 1 year
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
-
Rakmo almost 4 years
sudo
. This is God level option.
-
-
Ken Verganio almost 4 yearsI did what you said but it still displays the same error and is it ok if my username in whoami is different in the git config --global -l username that I use. I run your code and input password and after that, I run flutter doctor but it displays the same error
-
Ken Verganio almost 4 yearsno it says no such file or directory when I use cd .git
-
Ken Verganio almost 4 yearsi cant cd in usr/bin/git
-
SwissCodeMen almost 4 yearsand if you don't access the .git folder, you must enter the same command above in the answer for the
.git
folder and not for the config folder (I misunderstand your question) -
Ken Verganio almost 4 yearsLet us continue this discussion in chat.
-
Ken Verganio almost 4 yearswhen i cd the usr/bin/git it says no such file or directory
-
Ken Verganio almost 4 yearsi found where my git folder is and when I run your code sudo chown -R <mysusername> .config it says no such file or directory and when I run the ls -la I don't see my username and also I don't see any .config file in my git folder
-
Ken Verganio almost 4 yearsits in usr/local/git and when I run git init it says permission denied
-
Ken Verganio almost 4 yearsI locate my .git folder but it says "zsh: permission denied: /Users/me/.git" thats why i can't run your ocde
-
Ken Verganio almost 4 yearsbut how do i access this .git folder
-
Ken Verganio almost 4 yearsalso the .git folder has zero bytes when i locate and open it it's empty
-
Ken Verganio almost 4 yearsi ask another question in here stackoverflow.com/questions/61830920/…
-
Ken Verganio almost 4 yearsi solved the problem by running sudo chown -R <username> .config or .git in flutter folder