permission denied with cocoapod install from appcode


When I run cocoapods > install i get the follow output:

/usr/bin/ruby /Applications/ install --no-color
Analyzing dependencies
[!] Pod::Executable pull

error: cannot open .git/FETCH_HEAD: Permission denied

Failed with exit code: 1

but when i run it from the command line its fine.

is there a setting i'm missing?


Comment actions Permalink

Please make sure that AppCode's process owner has enough rights for "~/.cocoapods" repository. Specifically what does "ls -l ~/.cocoapods/.git/FETCH_HEAD" show?

Comment actions Permalink

thanks. runing that command gives me "ls: /Users/bono/.cocoapods/.git/FETCH_HEAD: No such file or directory"

it turns out the actual directory is:

$ ls -l ~/.cocoapods/repos/master/.git/FETCH_HEAD

-rw-r--r--  1 root  staff  1121 Jan 18 15:27 /Users/bono/.cocoapods/repos/master/.git/FETCH_HEAD

is this a setting i can change in appcode?

i'm using cocoa pods version 0.29.0 with osx 10.9.1 if that helps.

Comment actions Permalink

Yes, it's "~/.cocoapods/repos/master/..." - I've messed that up in my message.

Looks like your CocoaPods repository has been created/updated under "root" credentials. Maybe you have "su" applied to your Terminal or something. Easiest way to fix this I think is to use "chown":

chown -R bono ~/.cocoapods

This will transfer ownership of the repository so every tool (including AppCode) launched by "bono" could modify it.


Please sign in to leave a comment.