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

  • Phonegap Unable to install plugins using plugman
  • How do I setup Cordova?
  • Cordova - Install AdMob Plugin on Android Failed (Mac)
  • Accessing Github behind corporate proxy Node.js
  • Cordova Custom Plugin “Arguments to path.join must be strings”
  • failed to create task or type checkenv Cause The name is undefined
  • 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!

  • Managing a Yii app with Git
  • How to checkout to a particular commit in smartgit
  • Using Git or SVN with a web server
  • Installing TextBelt on my own server
  • Any Git shortcuts for the current branch and the branch it tracks?
  • Significance of 1 and 2 while reverting merge commit
  • 3 Solutions collect form web for “Pod installation error: Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named master”

    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.

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

    —————– second try: double the buffer size ————————-
    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

    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.

    Git Baby is a git and github fan, let's start git clone.