Hello, This error wasted a lot of time I need to find a solution.
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
but it doesn't work....
pod install
, the terminal will show this error again!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
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.
@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.
DanToml's answer worked for me
DanToml's answer worked for me
Most helpful comment
This should be fixed by running: