Unable to add a source with url

后端 未结 12 1239
庸人自扰
庸人自扰 2021-02-04 01:19

[!] Unable to add a source with url git@github.com:CocoaPods/Specs.git named master-1. You can try adding it manually in ~/.cocoapods/repos

相关标签:
12条回答
  • 2021-02-04 01:54

    You need to have access to the pod spec repo first. For me I wasn't having access.So this issue happened.

    0 讨论(0)
  • 2021-02-04 01:58

    I had the same problem , actually the problem was that command line was not able to find a path to my Xcode. Therefore the simplest solution that i found was to give a suitable location of xcode.

    For it:

    1. Go to Xcode > Preferences
    2. Choose Location tab
    3. Select the Xcode in Command Line tools:-

    thats it. I hope that works for you. All the best

    0 讨论(0)
  • 2021-02-04 02:00
    1. $ cd /Users/username/.cocoapods/repos
    2. remove folder master if it exists
      rm -rf master
      $ git clone https://github.com/CocoaPods/Specs.git master
    3. pod setup

    that's all.

    0 讨论(0)
  • 2021-02-04 02:03

    Meet the same error and I have solved it by :

    1. Open your terminal
    2. Go to the directory    : cd /User/YOUR_NAME/.cocoapods/repos/
    3. remove the master file : rm -rf master
    4. Clone the CocoaPods    : git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
    

    Note. I add the target path ~/.cocoapods/repos/master to avoid the mistake that your current file path is not ~/.cocoapods/repos/master

    5. Run the setup          : pod setup 
    
    0 讨论(0)
  • 2021-02-04 02:05

    Please Follow this steps:

    Open Terminal

    1] sudo xcode-select -r

    2] Xcode-->Preferences-->Locations-->Command line tool --> set your Current Xcode Version.

    3] Edit Podfile and save

    4] pod install

    Thats it.

    0 讨论(0)
  • 2021-02-04 02:07

    I was getting the same error with only difference that there was different URL. I was trying to install private pods from private repository. What helped is to add ssh-key to profile.

    1. Generate ssh-key using this guide: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/. Hope this helps.
    2. Add it in your profile settings on Bitbucket(or Github or whatever you are using)
    0 讨论(0)
提交回复
热议问题