Problem installing via cocoapods (fatal: No names found, cannot describe anything)
Closed this issue · 5 comments
DeepAnchor commented
Hey,
When attempting to install via cocoapods, I'm encountering the following error:
Updating local specs repositories
Analyzing dependencies
Pre-downloading: `Regex` from `https://github.com/sharplet/Regex.git`
fatal: No names found, cannot describe anything.
[!] Unable to satisfy the following requirements:
- `Regex (from `https://github.com/sharplet/Regex.git`)` required by `Podfile`
I'm kind of new to ios programming -any idea what could be going wrong?
sharplet commented
Huh, that's really strange. Would you mind running pod install --verbose
and posting the output?
DeepAnchor commented
Sure, here it is:
pod install --verbose
pod install --verbose @ 02:56:07 pm...
Preparing
Updating local specs repositories
Updating spec repo `master`
$ /usr/local/bin/git pull --ff-only
error: The following untracked working tree files would be overwritten by merge:
Specs/Action/0.1.0/Action.podspec.json
Please move or remove them before you can merge.
Aborting
Updating 267199b..4f287cb
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods`: (``)
Using `ARCHS` setting to build architectures of target `Pods-ETA-ios-client`: (``)
Finding Podfile changes
A Regex
- AMScrollingNavbar
- Alamofire
- FBSDKCoreKit
- FBSDKLoginKit
- PromiseKit
- Static
- SwiftLocation
- SwiftSpinner
- SwiftyJSON
- SwiftyTimer
Fetching external sources
-> Pre-downloading: `Regex` from `https://github.com/sharplet/Regex.git`
> Git download
> Git download
$ /usr/local/bin/git clone https://github.com/sharplet/Regex.git
/var/folders/cp/35w3f3mx5hv7gq9tc8krbqkm0000gn/T/d20151126-64518-zlixg3 --single-branch --depth
1
Cloning into '/var/folders/cp/35w3f3mx5hv7gq9tc8krbqkm0000gn/T/d20151126-64518-zlixg3'...
fatal: No names found, cannot describe anything.
> Copying Regex from
`/Users/deepanchor/Library/Caches/CocoaPods/Pods/External/Regex/bdd9b72b501fe76f841b9205f49e4a4e`
to `Pods/Regex`
Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:
- `Regex (from `https://github.com/sharplet/Regex.git`)` required by `Podfile`
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/resolver.rb:411:in `handle_resolver_error'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/resolver.rb:69:in `rescue in resolve'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/resolver.rb:57:in `resolve'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:539:in `block in resolve_dependencies'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in `section'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:537:in `resolve_dependencies'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:70:in `analyze'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:213:in `analyze'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:136:in `block in resolve_dependencies'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/user_interface.rb:59:in `section'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:135:in `resolve_dependencies'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:105:in `install!'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:101:in `run'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Users/deepanchor/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/Users/deepanchor/.rbenv/versions/2.2.3/bin/pod:23:in `load'
/Users/deepanchor/.rbenv/versions/2.2.3/bin/pod:23:in `<main>'
sharplet commented
Ok, so it looks like this is the problem:
- CocoaPods performs a shallow clone, fetching only the latest commit
- There is something using
git describe
- Because the clone is shallow, and the latest commit on master doesn't have a tag,
git describe
fails (source: http://stackoverflow.com/questions/4916492/git-describe-fails-with-fatal-no-names-found-cannot-describe-anything)
Here's a workaround:
pod "Regex", git: "https://github.com/sharplet/Regex.git", tag: "v0.2.2"
I'll update the README accordingly.
DeepAnchor commented
Works great -thanks for the project and the quick turnaround!
sharplet commented
You're welcome!