[!] 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
You need to have access to the pod spec repo first. For me I wasn't having access.So this issue happened.
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:
thats it. I hope that works for you. All the best
$ cd /Users/username/.cocoapods/repos
master
if it existsrm -rf master
$ git clone https://github.com/CocoaPods/Specs.git master
pod setup
that's all.
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
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.
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.
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.