This is the short version:
When I run
pod install
in an Xcode project I get
[!] Pod::Executable pull error: cannot open .git/FETCH_HEAD:
Permission denied
If I run
sudo pod install
I get no error, but my files installed are owned by root and can't compile and I have to chown
those files to a normal user to use the Xcode compiler.
I am running Lion OSX.
I installed cocoaPods using
sudo gem install cocoaPods
I had to use sudo
because without it I got
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
so now I have a root installed version of cocoaPods that downloads root owned Xcode libraries.
Is sudo
installation of cocoaPods the wrong way or normal way?
If normal, is there a way to fix the pod install problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…