Spec create crash with private remotes #1543

Closed
mattyohe opened this Issue Nov 4, 2013 · 12 comments

Comments

Projects
None yet
6 participants
@mattyohe

mattyohe commented Nov 4, 2013

Report

  • What did you do?
    Ran spec create:
pod spec create https://github.com/XXXXX/XXXXXX
  • What did you expect to happen?
    I assume a spec would be created with (as the Usage claims) pre-populated fields.
  • What happened instead?
    The crash below occurred.

Stack

   CocoaPods : 0.27.1
        Ruby : ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0]
    RubyGems : 1.8.24
        Host : Mac OS X 10.9 (13A603)
       Xcode : 5.0.1 (5A2053)
Ruby lib dir : /Users/mattyohe/.rvm/rubies/ruby-1.9.3-p194/lib
Repositories : CocoaPods-InternalSpecs - git@github.com:XXXXXXXX/CocoaPods-InternalSpecs.git @ 57f05c6853cf92cea92837cd9f7a234c584a21ce
               master - https://github.com/CocoaPods/Specs.git @ 5c6e7f1565e56672df272e18a4ba2446e88d9ac8

Error

NoMethodError - undefined method `[]' for nil:NilClass
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.27.1/lib/cocoapods/command/spec.rb:402:in `github_data_for_template'
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.27.1/lib/cocoapods/command/spec.rb:36:in `run'
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/gems/claide-0.3.2/lib/claide/command.rb:206:in `run'
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.27.1/lib/cocoapods/command.rb:51:in `run'
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.27.1/bin/pod:19:in `<top (required)>'
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/bin/pod:19:in `load'
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/bin/pod:19:in `<main>'
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/Users/mattyohe/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

However creating the spec with just a name seems to operate as expected.

@orta

This comment has been minimized.

Show comment
Hide comment
@orta

orta Nov 4, 2013

Member

Is the github repo public?

Member

orta commented Nov 4, 2013

Is the github repo public?

@mattyohe

This comment has been minimized.

Show comment
Hide comment
@mattyohe

mattyohe Nov 4, 2013

@orta Unfortunately no.

Curious though maybe I'm just mistaken and this is more of a Usage/Documentation bug...

My assumption here was that filling in the URL would simply pass that along to the spec's source method. Is this incorrect?

mattyohe commented Nov 4, 2013

@orta Unfortunately no.

Curious though maybe I'm just mistaken and this is more of a Usage/Documentation bug...

My assumption here was that filling in the URL would simply pass that along to the spec's source method. Is this incorrect?

@orta

This comment has been minimized.

Show comment
Hide comment
@orta

orta Nov 4, 2013

Member

It will go and pull in a bunch of metadata from the github repo itself like name, description, author etc. So it could be we're making presumptions about what we can find on the repo.

Member

orta commented Nov 4, 2013

It will go and pull in a bunch of metadata from the github repo itself like name, description, author etc. So it could be we're making presumptions about what we can find on the repo.

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Nov 4, 2013

Member

This definitely is related to the repo being private. I guess we could take auth parameters, assuming the required code that’s needed is simple enough.

@mattyohe Interested in working on this?

Member

alloy commented Nov 4, 2013

This definitely is related to the repo being private. I guess we could take auth parameters, assuming the required code that’s needed is simple enough.

@mattyohe Interested in working on this?

@mattyohe

This comment has been minimized.

Show comment
Hide comment
@mattyohe

mattyohe Nov 4, 2013

@orta So right, I was just targeting at a bare repo at the moment. Again, only assuming it would grab like the title of the repo and use the URL in the source path.

Methinks this is more of an issue with my expectations of what this would actually do.

mattyohe commented Nov 4, 2013

@orta So right, I was just targeting at a bare repo at the moment. Again, only assuming it would grab like the title of the repo and use the URL in the source path.

Methinks this is more of an issue with my expectations of what this would actually do.

@mattyohe

This comment has been minimized.

Show comment
Hide comment
@mattyohe

mattyohe Nov 4, 2013

@alloy I need to work on my rubby skills before I'd feel comfortable helping out :D

mattyohe commented Nov 4, 2013

@alloy I need to work on my rubby skills before I'd feel comfortable helping out :D

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Nov 4, 2013

Member

Fair enough :)

To others, the calls are being made here with Nap and should use the following credentials.

Member

alloy commented Nov 4, 2013

Fair enough :)

To others, the calls are being made here with Nap and should use the following credentials.

@kylef

This comment has been minimized.

Show comment
Hide comment
@kylef

kylef Mar 11, 2014

Contributor

The use of credential from netrc is tracked by #876

Contributor

kylef commented Mar 11, 2014

The use of credential from netrc is tracked by #876

@CocoaPodsBot

This comment has been minimized.

Show comment
Hide comment
@CocoaPodsBot

CocoaPodsBot Mar 29, 2014

Issue has been confirmed by @neonichu

Issue has been confirmed by @neonichu

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Sep 16, 2014

Member

Is this issue still relevant?

Member

fabiopelosin commented Sep 16, 2014

Is this issue still relevant?

@mattyohe

This comment has been minimized.

Show comment
Hide comment
@mattyohe

mattyohe Sep 16, 2014

@fabiopelosin Well, I can confirm the issue is still present, but "relevant" is your call 😄

@fabiopelosin Well, I can confirm the issue is still present, but "relevant" is your call 😄

fabiopelosin added a commit that referenced this issue Sep 16, 2014

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Sep 16, 2014

Member

I think that fixing the crash is enough in this case. PR in #2479

Member

fabiopelosin commented Sep 16, 2014

I think that fixing the crash is enough in this case. PR in #2479

fabiopelosin added a commit that referenced this issue Sep 25, 2014

@segiddins segiddins closed this in #2479 Sep 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment