Sani
Sani

Reputation: 1283

CocoaPods permission issues

I've been using cocoapods for a while and it works perfectly fine, but today I'm having an issue installing the pod file for my project. I run the install command in the terminal and it seems that its hanging indefinitely.

Here is the verbose log:

Analyzing dependencies

Updating spec repositories
Updating spec repo `master`
/Library/Ruby/Gems/1.8/gems/cocoapods-0.24.0/lib/cocoapods/executable.rb:55: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/Library/Ruby/Gems/1.8/gems/cocoapods-0.24.0/lib/cocoapods/user_interface.rb:277: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
  $ /usr/bin/git pull
  Already up-to-date.

CocoaPods 0.29.0 is available.

Downloading dependencies

-> Installing AFNetworking (2.0.3)
 > GitHub download
 > Creating cache git repo (/Users/abdsaniabdjalal/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7)
/Library/Ruby/Gems/1.8/gems/cocoapods-0.24.0/lib/cocoapods/executable.rb:55: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
/Library/Ruby/Gems/1.8/gems/cocoapods-0.24.0/lib/cocoapods/user_interface.rb:277: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
     $ /usr/bin/git clone  --mirror "https://github.com/AFNetworking/AFNetworking.git"
     "/Users/abdsaniabdjalal/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7"
     Cloning into bare repository '/Users/abdsaniabdjalal/Library/Caches/CocoaPods/GitHub/a7f129229d47b74a225e1e2ed0bc604f35d71ac7'...

I just recently upgraded to Mavericks, while I don't think it is related to this issue, has anyone encountered this issue before?

Edit: It turns out that I'm having permission issues installing pods to my projects.

So I have already tried to fix permissions using Disk Utility. I've also tried fixing permissions using the password reset utility at startup but I still have this issue.

Installing the pod using sudo command works, but then I dont have write access to the Pod Project File and the Workspace file because it is created by root.

Anyone have any ideas on how to fix this?

I created another user profile on my Mac and it works fine but it's a hassle for me to transfer everything else to the new profile.

Upvotes: 2

Views: 3541

Answers (1)

Sani
Sani

Reputation: 1283

This is humiliating. This command fixed it:

sudo chown -R username:groupname ~/Library/Caches/CocoaPods

Taken from this answer:

cocoaPods pod install Permission denied

Upvotes: 3

Related Questions