Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Add user does not work #70

Closed
mamobyz opened this issue Sep 25, 2014 · 4 comments
Closed

Add user does not work #70

mamobyz opened this issue Sep 25, 2014 · 4 comments
Assignees
Labels

Comments

@mamobyz
Copy link

mamobyz commented Sep 25, 2014

I am experiencing the same issue as described in npm/npm-registry-couchapp#199. The issue is caused by the changes in npm-registry-client/lib/adduser.js done in the commit c96fc63. There url.resolve() is used to replace request.toRegistryURL(), so that the path segments of the registry URL get truncated. For instance, in case of npm-registry-couchapp, the base URL has the shape of http://host:port/registry/_design/app/_rewirte. After applying url.resolve(), the request URL looks like http://host:port/-/user/org.couchdb.user:*, which is rejected by CouchDB, since the dash sign in the URL is recognized as a database name which is not allowed in CouchDB.

Configuring a virtual host in CouchDB for the npm-registry-couchapp is not always an option.

@othiym23 othiym23 self-assigned this Sep 25, 2014
@othiym23 othiym23 added this to the npm-2.0.3 milestone Sep 25, 2014
@othiym23
Copy link
Contributor

Configuring a virtual host in CouchDB for the npm-registry-couchapp is not always an option.

This is true. I have a fix in mind and it's pretty easy to implement, so I'll probably get that out today and include it in npm@2.0.3. It turns out that url.resolve is a little tricky to use correctly!

@mamobyz
Copy link
Author

mamobyz commented Sep 25, 2014

Great, thanks!

@fchambo
Copy link

fchambo commented Oct 19, 2014

Here is another example of a not working non-root registry. Please consider this in your fix. Thanks!

@othiym23 othiym23 removed this from the npm-2.1.4 milestone Oct 21, 2014
@othiym23
Copy link
Contributor

This is actually a bit more involved than I originally thought it was, but my current goal is to get this into npm@2.1.6, which will become npm@next this upcoming Thursday. There are a bunch of minor fixes I need to make to npm-registry-client to deal properly with non-root registry base URLs. Sorry for the delay!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants