permission denied with cocoapod install from appcode

Hi,

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

/usr/bin/ruby /Applications/AppCode.app/bin/pod 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?

thanks

3 comments
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?

0
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.

0
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.

0

Please sign in to leave a comment.