Hello, I'm trying to push a pod to the my spec.
My CocoaPods version is 0.35.0. latest.
It does pass local validation:
pod spec lint --allow-warnings mypods.podspec
-> mypods (1.0.4)
- WARN | [source] Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
Analyzed 1 podspec.
mypods.podspec passed validation.
pod lib lint --allow-warnings mypods.podspec
-> mypods (1.0.4)
- WARN | [source] Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
mypods passed validation.
However when trying to push to my spec I get:
pod repo push --allow-warnings myspecs mypods.podspec
Validating spec
[!] The `mypods.podspec` specification does not validate.
--verbose option
pod repo push --verbose myspecs mypods.podspec
Validating spec
mypods (1.0.4) - Analyzing on iOS platform.
Preparing
Analyzing dependencies
Inspecting targets to integrate
Fetching external sources
-> Fetching podspec for `mypods` from `/Users/[****my_user****]/github/mypods/mypods/mypods.podspec`
Resolving dependencies of
[!] The `mypods.podspec` specification does not validate.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:90:in `rescue in block in validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:87:in `block in validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:84:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:84:in `validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:42:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
This is mypods.podspec file
Pod::Spec.new do |s|
s.name = "mypods"
s.version = "1.0.4"
s.summary = "A long description of mypods."
s.homepage = "https://github.com/m-sugawara/mypods"
s.license = { :type => "MIT", :file => "LICENSE.txt" }
s.author = { "m-sugawara" => "https://github.com/m-sugawara" }
s.platform = :ios
s.source = { :git => "[email protected]:m-sugawara/mypods.git", :tag => "1.0.4", :commit => "b33e0358e2ce80540fbd927b02ab99147fa644b3" }
s.source_files = "Classes", "Classes/**/*.{h,m}", "mypods/Classes/**/*.{h,m}"
s.requires_arc = true
end
Had you pushed that tag to github yet?
Yes, I already had pushed that tag to github.
This is my command
git tag -a "1.0.4" -m "version1.0.4"
git push origin --tags
Strange how pod spec lint
passes but repo push didn't and doesn't really show a reason.
I spotted this in your podspec: :tag => "1.0.4", :commit => "b33e0358e2ce80540fbd927b02ab99147fa644b3"
, you've specified both a tag and a commit. You should only have one or the other (and preferably a tag).
@kylef
Thank you for your response.
I deleted :commit => "b33e0358e2ce80540fbd927b02ab99147fa644b3"
from my podspec, and try pod repo push --allow-warnings myspecs mypods.podspec
command. but it does not passed validation.
I also deleted :tag => "1.0.4"
from my podspec. but it does not passed validation too.
This is my latest mypods.podspec file
Pod::Spec.new do |s|
s.name = 'mypods'
s.version = '1.0.4'
s.summary = 'hello my pods!!'
s.homepage = 'https://github.com/m-sugawara/mypods'
s.license = { :type => 'MIT', :file => 'LICENSE.txt' }
s.platform = 'ios'
s.author = { 'm-sugawara' => '[email protected]' }
s.source = { :git => 'https://github.com/m-sugawara/mypods.git', :tag => '1.0.4' }
s.source_files = 'mypods/Classes/**/*.{h,m}'
s.requires_arc = true
end
This is my pods repo list, and I try push
all repo except master. but it does not passed validation.
pod repo list
master
- Type: git (origin)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/[****my_user****]/.cocoapods/repos/master
myspecs
- Type: git (origin)
- URL: https://github.com/m-sugawara/myspecs.git
- Path: /Users/[****my_user****]/.cocoapods/repos/myspecs
privatespecs
Could not get sha1 for HEAD. Skipping.
- Type: git ()
- URL:
- Path: /Users/[****my_user****]/.cocoapods/repos/privatespecs
testPods
- Type: local copy
- Path: /Users/[****my_user****]/.cocoapods/repos/testPods
4 repos
pod repo push myspecs --allow-warnings mypods.podspec
Validating spec
[!] The `mypods.podspec` specification does not validate.
pod repo push privatespecs --allow-warnings mypods.podspec
Validating spec
[!] The `mypods.podspec` specification does not validate.
pod repo push testPods --allow-warnings mypods.podspec
Validating spec
[!] The `mypods.podspec` specification does not validate.
As of https://github.com/CocoaPods/CocoaPods/commit/367c539ac1910f298ee2641db458dd896e9e4fc8, the underlying error message will be shown.
@segiddins
Thank you for your prompt response.
I changed push.rb
file as of 367c539, and try to push
.
This message showed.
$ pod repo push myspecs mypods.podspec
Validating spec
[!] The `mypods.podspec` specification does not validate.
undefined method `downcase' for nil:NilClass
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:395:in `source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:37:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:435:in `block in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:434:in `map'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:434:in `sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:376:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:375:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/analyzer.rb:58:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:184:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:106:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:105:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:90:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/validator.rb:304:in `install_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/validator.rb:210:in `block in perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/validator.rb:206:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/validator.rb:206:in `perform_extensive_analysis'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/validator.rb:73:in `validate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:88:in `block in validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:84:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:84:in `validate_podspec_files'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo/push.rb:42:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
@m-sugawara just had the same issue, kinda new to cocoapods but what I had found was:
That somehow I had pushed my pod spec to the repos folder under ~/.cocoapods/repos instead of under my REPO folder. Then when I corrected the terminal command for the repo push... I could not get the "pod repo push" to work but I could get the "pod spec lint" working
So I was able to resolve this by removing my locally pushed pod spec folder from the ~/.cocoapods/repos/
http://guides.cocoapods.org/terminal/commands.html#pod_repo_push
Hope this helps others...
@nickdep7
Thank you for your response.
I tried to remove this.
- Type: local copy
- Path: /Users/[****my_user****]/.cocoapods/repos/testPods
And try pod repo push
, it passed validation!
Thank you so much.
I was running into this same issue pushing to my private spec repo. As a workaround, I moved ~/.cocoapods/repos/master
and made a symlink from ~/.cocoapods/repos/myspecrepo
to ~/.cocoapods/repos/master
. Then validation passed and the push succeeded.
I think this is related to sources and push wasn't using myspecrepo as a source. Perhaps pod repo push
needs the same --sources=
option as pod spec lint
?
@brianpartridge pod repo push
uses all available sources on the machine.
@segiddins well there's definitely a issue then because removing the master repo made the push validation work. This is on 0.36. (sorry to hijack the thread)
I'm going to close this issue since the OP's original issue has been resolved.
@brianpartridge Please file a new issue for your problem, and please include full steps to reproduce.
I can't repro. Maybe my local copy of the spec repo got out of date. Will open a new issue if it happens again. Thanks.
pod repo push --verbose --allow-warnings
@zhipcui OMG that thing just made it work.. I was stuck for hours
i found that was some changed file do not commit , so i tag another tag and it Pushing the repo success
Can you tell me how resolve the problem锛燂紵 @m-sugawara
I have the same issue ,but i can't resolve it?
thanks i resolved
thanks i resolved
How do u resolved this issue
Most helpful comment
pod repo push --verbose --allow-warnings