sonatype / nexus-ruby-support

26 stars 7 forks source link

Username/password combinations longer than ~45 character cause gem uploads to fail #23

Closed HerbCSO closed 11 years ago

HerbCSO commented 11 years ago

If your username/password combination is longer than approximately 45 characters (varies a bit due to the variable encoding, depends on character content) then the authentication information stored in ~/.gem/nexus changes format from something like:

:authorization: Basic Y2Fgg3RlbsdfkcmVlc2Y2g6NlhNM1VyMyM0Q0QWZ2dCZ2eFk=

to something that looks like this:

:authorization: ! 'Basic Y2FydsfRlbi5kcmVlc2Jsdf2gxOmEfs3NoYXJhY3Rlclsdf3N3b3JkVGVzdGlu

  Zw=='

(contents changed to protect the innocent ;] ). In other words a ! is added after :authorization:, the string is wrapped in single quotes and it stretches over multiple lines.

When this happens, the gem upload ultimately fails with:

something went wrong - maybe (re)deployment is not allowed

Changing passwords to a shorter one and having it re-create the ~/.gem/nexus file results in a single-line :authorization: entry and gem upload works again.

Please enable the use of long username/password combinations.

mkristian commented 11 years ago

just pushed a new nexus gem with the fix to rubygems.org. please reopen the issue if it stills gives you problems.

HerbCSO commented 11 years ago

Awesome, thanks for the quick response!

Seems to work fine for me - thanks much for the update!