问题
I have this problem which is I need to restore the default permission on my git because when I'm executing the flutter doctor I get an error
fee@Mac-mini ~ % flutter doctor -v
warning: unable to access '.git/config': Permission denied
fatal: unable to access '.git/config': Permission denied
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
Returning 1970-01-01 08:00:00.000 instead.
[✓] Flutter (Channel unknown, 0.0.0-unknown, on Mac OS X 10.15.3
19D76,
locale
en-US)
• Flutter version 0.0.0-unknown at /Users/fee/Documents/flutter
• Framework revision (), 1970-01-01 08:00:00.000
• Engine revision b59e3e9c39
• Dart version 2.9.0 (build 2.9.0-8.0.dev 2bf3259005)
[✓] Android toolchain - develop for Android devices (Android SDK.
version 28.0.3)
• Android SDK at /Users/fee/Library/Android/sdk
• Platform android-29, build-tools 28.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.8.4
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google
Chrome
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
[✓] Connected device (2 available)
• Web Server • web-server • web-javascript • Flutter Tools
• Chrome • chrome • web-javascript • Google Chrome
81.0.4044.138
• No issues found!
fee@Mac-mini ~ %
I have a good friend who helps me in here he said that if my run sudo chown -R .config in .git directory it restores the default permission
but when i locate my .git folder in terminal it says permission denied that's why i cant run the code in .git folder to restore my user permission
fee@Mac-mini git % /Users/fee/.git
zsh: permission denied: /Users/fee/.git
help me on how to access this .git folder that contains the .config to restore my permission or how to restore the default user permission using git config
来源:https://stackoverflow.com/questions/61830920/where-to-find-the-config-directory-of-git-on-mac-os