Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pod installation error: [!]Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named master

I followed the steps on PhoneGap website and got stuck on the step using command "pod install" and got the error message as below:

MyMac:PhoneGapTest username$ pod install

Setting up CocoaPods master repo
[!] Unable to add a source with url https://github.com/CocoaPods/Specs.git named master.
You can try adding it manually in ~/.cocoapods/repos or via pod repo add.

Here is the information for my machine
1. Mac OS 10.12 Sierra
2. Xcode 8.0 (8A218a) [Setting in “Xcode/Peference/Locations/Command Line Tools” is set to “Xcode 8.0 (8A218a)”, path is “/Application/Xcode.app”]

Please suggest on how to resolve this. Thank you!

like image 389
user2704095 Avatar asked Oct 14 '16 09:10

user2704095


2 Answers

If you recently installed the latest version of XCode in your mac, I would suggest to have a look at the Preferences once.

Go to XCode => Preferences => Locations and update the Command Line Tools like this:

enter image description here

Now try pod update and it will work like before.

like image 195
atulkhatri Avatar answered Sep 20 '22 19:09

atulkhatri


I had this issue on my mac as well.

Please go to this link: https://github.com/CocoaPods/CocoaPods/issues/4293

I fixed this issue by doing the following:

  • cd to ~/.cocoapods/repos

  • Run git clone https://github.com/CocoaPods/Specs.git master

Tried update cocapods, re init pod and update repo, none of that works for me.

Hope it helps.

like image 26
wei Avatar answered Sep 18 '22 19:09

wei