-1

Git works well on Mac, but from some point it doesn't work.

user@userui-MacBookAir  ~  git init test

warning: unable to access '/Users/user/test/.git/config': Operation not permitted

fatal: unknown error occurred while reading the configuration files

As above, all commands of git including git init do not work.

But the following commands work normally.

which git > /usr/bin/git

git --version > git version 2.39.2 (Apple Git-143)

Any advice on resolving this issue?

I tried belows.

  1. https://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/

  2. delete ~/.gitconfig

Neo87
  • 1
  • 2
  • 1
    Identical to https://stackoverflow.com/questions/75363756/i-cant-use-git-on-my-macbook-unable-to-access-operation-not-permitted-fatal – matt Aug 11 '23 at 10:32
  • This isn't Git - it's file permissions on `/Users/user/test/.git/config`. Are you listed as the owner of that file, or do you have read permission? (`ls -la /Users/user/test/.git` would be a good place to start looking.) – Jim Redmond Aug 11 '23 at 17:17
  • I checked permission and use sudo.. but git was not working. So I will try after reinstall OS – Neo87 Aug 15 '23 at 22:34

0 Answers0