Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!] Unable to add a source with url https://github.com/CocoaPods/Specs.git named master-1. #6269

Closed
Ade0408 opened this issue Dec 5, 2016 · 5 comments
Labels
s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member

Comments

@Ade0408
Copy link

Ade0408 commented Dec 5, 2016

Hello, This error wasted a lot of time I need to find a solution.

  1. My Mac just install one Xcode, 8.1, Mac system is macOS Sierra 10.12.1
  2. And I tried
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

but it doesn't work....
3. And I tried to uninstall cocoapods, reload cocoapods, when I execute pod install, the terminal will show this error again!
4. final, the cocoapod is 1.1.1, I hope you can contact me as soon as possible, thanks!

@endocrimes
Copy link
Member

This should be fixed by running:

$ rm -rf ~/.cocoapods
$ mkdir -p ~/.cocoapods/repos
$ cd ~/.cocoapods/repos
$ git clone https://github.com/CocoaPods/Specs.git master

@endocrimes endocrimes added the s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member label Dec 5, 2016
@Ade0408
Copy link
Author

Ade0408 commented Dec 6, 2016

Thank you for your reply!
when I git clone completion, then I execute pod setup , the terminal show :

Setting up CocoaPods master repo
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
[!] The `master` repo is not a git repo.

How should I fix this?

and I try to execute pod install again, still show this error :

Re-creating CocoaPods due to major version update.
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
Setting up CocoaPods master repo
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

@endocrimes
Copy link
Member

@SunnyLinSD There's no need to run pod setup when manually checking out the repo, however, it looks like you're running an outdated version of git. CocoaPods >= 1.1.0 requires 1.8.5 or newer and we added a better error for this on master.

@chigogiggs
Copy link

DanToml's answer worked for me

1 similar comment
@LiuzhuYang
Copy link

DanToml's answer worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member
Projects
None yet
Development

No branches or pull requests

4 participants