Hello,
Nexus OSS doesn’t seem to support user token. Can you please help what is the command with user account and password to download/upload NPM package in Curl or REST API?
Thanks,
Chang
Hello,
Nexus OSS doesn’t seem to support user token. Can you please help what is the command with user account and password to download/upload NPM package in Curl or REST API?
Thanks,
Chang
Hi Chang Park
You are correct, Sonatype Nexus Repository OSS does not support user tokens; this feature is only available in Nexus Repository Pro. For Nexus OSS, you must use your regular user account and password for authentication.
To download an NPM package using curl, you can use the following command, replacing username
, password
, and the URL with your actual values:
wget --user username --password password https://:8081/repository/npm-proxy/your-package/-/your-package-version.tgz
Or with curl:
curl -u username:password -O https://:8081/repository/npm-proxy/your-package/-/your-package-version.tgz
This approach uses basic authentication with your Nexus user credentials, which is supported in Nexus OSS for accessing repositories Download artifacts using URI.
For uploading (publishing) NPM packages, you typically use the npm CLI, but if you need to authenticate, you can configure your .npmrc
file with your username and password (base64-encoded).