Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Publish npm package to Proget
-
run:
npm config get registryif you don't see the correct registry
try:
npm config set regist <urltoregistry> -
npm registry configured properly
I'm trying to do this:
npm Token Authentication
In order to interact with your private registry without using the npm adduser command you will need to follow these steps:Create an API Key - you can create an API Key in ProGet (Admin > API Key & Access Logs) with Feed Access. you can further restrict this key by associating it to a user you've already given specific permissions
Encode The API Key - Once the key has been generated you will need to encrypt the key along with the username api. This needs to be encoded in base64 format. Your string prior to encoding should be: api:{APIKEY}
Once you have this token you will need set your _auth value with it using npm. It is also recommended that you set always-auth to true.[~]$ npm config set always-auth=true
[~]$ npm config set _auth={ENCODEDAPIKEY}https://inedo.com/support/documentation/proget/feeds/npm
Does it works in proget ? or I cant login with auth token?
-
Hi Taras,
This has been tested in ProGet, in order to publish with Token authentication:
- You need to create a user in proget
- give that user the Add Package role
- create a new token that impersonates that user.
- encrypt the token to base64
-
Hi!
Som i've genereate a token like this : FHGDSFREG-3FrF
Then, accroding to documentation, i need to encrypt this key with user API
Before encryption should be like this:
api:{FHGDSFREG-3FrF}
after encryption with base 64 will be string: YXBpOntGSEdEU0ZSRUctM0ZyRn0g
Then, I need to add this with command:
npm config set _auth={YXBpOntGSEdEU0ZSRUctM0ZyRn0g}
Correct? -
Hi! Any updates ?
-
Taras,
try encrypting without the brackets
{}so encrypt this first:
api:FHGDSFREG-3FrFyour command should exclude
{}as wellnpm config set _auth=YXBpOntGSEdEU0ZSRUctM0ZyRn0g__newtoken -
hello, any updates?
I also encounter the same problem. How can I fix it? -
looks like ive found my way here as well, the documentation isnt very clear to include or not include the {}s
ive tried both, and cant get it working either (i can publish with username and password but not api key)@jjones said in Publish npm package to Proget:
__newtoken
Can you explain why this is on the end of your command?
i also see various things that scoped packages should be using _authtoken not just _auth, my package is scoped
-
Hello @pcoombe_0297,
You can use
apias the username and an API key as the password for any feed API supported by ProGet.The auth format is HTTP Basic auth, so you'd prefix the API key with
api:and then base64-encode the result.You can also log in interactively via the npm login command. If your ProGet username cannot be used as an NPM username (such as a qualified domain user), ProGet will also accept the username via the email field.
-
Any updates on this? I encounter the same issue and none of your comments helped
.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login