Comments (9)
Thanks for taking a look. I tested your latest code snippet and it does work! I didn't realize I could pull the always-auth
field from the config. Thanks for the tip. I'll start working on a PR.
from npm.
Thanks for the report!
I think you can configure this option in a .npmrc
file at the root of your project:
always-auth = true
The config is read get-last-release.js#L9.
We prefer to configure all npm
options in the .npmrc
rather than adding new options to the plugin.
Let us know if that work. If it doesn't work, the proper fix will be to make sure we read this property from .npmrc
.
On a side note it would be good to add some comments about that in the README.
from npm.
Looking at it more in details the alwaysAuth
has to be configured in the auth
object when calling the client and not in the regular config.
So the client call should be something along those lines:
const auth = NPM_TOKEN ? {token: NPM_TOKEN} : {username: NPM_USERNAME, password: NPM_PASSWORD, email: NPM_EMAIL};
auth.alwaysAuth = config.get('always-auth');
const data = await promisify(client.get.bind(client))(uri, {auth});
PR with tests is welcome!
from npm.
FYI, I created #7 to address this issue.
from npm.
Are you authenticating with a token or with username / password and email? Just wondering.
Looking at the client code it seems that in the case of a call that set the token
the request is always authenticated no matter the always-auth
parameter.
The always-auth
param seems to be used only in the case of a legacy auth (user/pass/mail). See https://github.com/npm/npm-registry-client/blob/c1f1f431550d5faf86dc6cfb2e7e0d094194021b/lib/authify.js#L11
from npm.
That's right. We're using username + password. It looks like we have an older style auth token that uses _auth
, not _authToken
, so it doesn't seem to work with these libraries
from npm.
@pbomb I'm working on the PR #10 in order to officially support the the legacy authentication (_auth
). We would like to mention in the docs the private repository product that use legacy and auth and do not support the _authToken
.
Would you mind letting us know what repository product and version you are using?
Thanks!
from npm.
@pvdlg That's great. We're using Artifactory Version 5.3.1.
from npm.
Thanks for the info!
from npm.
Related Issues (20)
- You cannot publish over the previously published versions
- Provide a better error message in case of an E400 bad request without further explanation from npm
- semantic-release/npm forced npm version in scripts HOT 2
- Why is `npm version` used to set the version? HOT 1
- Add support for npm v9 HOT 7
- `prepack` run twice when set `tarballDir` HOT 1
- npm publish looks for package.json at disk root HOT 3
- Incompatible with Yarn (Berry) HOT 1
- a `Cannot read properties of null (reading 'matches'` error when using multi-semantic-release HOT 8
- Use clean-publish
- fix vulnerability with http-cache-semantics <4.1.0 HOT 4
- Why support of legacy auth was dropped? HOT 2
- pkgRoot property not working HOT 1
- Provenance support not working? HOT 1
- npm whoami failing HOT 3
- `package.json` version not updated, despite correct plugin ordering HOT 1
- Set --no-workspaces with npm version HOT 2
- Command failed with exit code 1: npm version 0.22.2 --userconfig HOT 2
- error on publishing HOT 1
- Publishing failed since update from [email protected] to [email protected] with files mentioned in .gitignore HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm.