Pod installation error: [!]Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named master
Solution 1
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:
Now try pod update
and it will work like before.
Solution 2
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.
Solution 3
@Mohshin Shah, thanks a lot. You make my day! I stucked with this for two weeks. Your suggestion is the foundation to the workaround. Below are what I've done.
----------------- first try: using buffer size as given -------------------
My-Mac:PhoneGapTest username$ git config http.postBuffer 524288000
----------------- second try: double the buffer size -------------------------
My-Mac: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
.
My-Mac:PhoneGapTest username$ git config http.postBuffer 1048576000
My-Mac: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
.
----------------- third try: the workaround, note: this might also work with the given buffer size --------------
My-Mac:PhoneGapTest username$ git clone https://github.com/CocoaPods/Specs.git master
Cloning into 'master'...
remote: Counting objects: 865802, done.
remote: Compressing objects: 100% (13060/13060), done.
remote: Total 865802 (delta 6507), reused 0 (delta 0), pack-reused 851785
Receiving objects: 100% (865802/865802), 348.54 MiB | 948.00 KiB/s, done.
Resolving deltas: 100% (375143/375143), done.
Checking connectivity... done.
Checking out files: 100% (114193/114193), done.
----------------- checking the result -------------------------
My-Mac:PhoneGapTest username$ ls
PhoneGapTest PhoneGapTestTests Podfile Pods
PhoneGapTest.xcodeproj PhoneGapTestUITests master
user2704095
Updated on July 09, 2022Comments
-
user2704095 almost 2 years
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 urlhttps://github.com/CocoaPods/Specs.git
namedmaster
.
You can try adding it manually in~/.cocoapods/repos
or viapod 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!