React Native – expo init fails with git permission denied error on MacOS

This problem can be quite annoying. Here is the part of my iTerm output displaying the error:


Here is my expo diagnostics:


To solve this I first tried launching a new terminal window and I immediately did  sudo su  to get admin rights. Then tried the same expo init command:

Failed again…

Then I tried the same with sudo. This time it worked. So, what you need to do is:

1) Open your terminal, do “sudo su”

2) And then run “sudo expo init my-proj”.


Hope this helps.
Good Luck,