admin管理员组文章数量:1401199
We're using Sonatype Nexus Repository ManagerOSS 3.29.0-02 and we're trying to create a TOKEN
to work with .npmrc
in the following structure :
registry=http://NEXUS-IP:8081/repository/GROUP-NAME
http://NEXUS-IP:8081/repository/GROUP-NAME/:_authToken=NpmToken.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
When I'm logged into the Sonatype Nexus Repository ManagerOSS I can't find anything that creates a valid token.
However , when I hit npm login
from the mand line and type the Username and Password ,
the npm install
works.
How can we create a valid TOKEN for those Username/Password pair for the Nexus Artifactory , so I'll be able to use that token from a Docker ?
We're using Sonatype Nexus Repository ManagerOSS 3.29.0-02 and we're trying to create a TOKEN
to work with .npmrc
in the following structure :
registry=http://NEXUS-IP:8081/repository/GROUP-NAME
http://NEXUS-IP:8081/repository/GROUP-NAME/:_authToken=NpmToken.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
When I'm logged into the Sonatype Nexus Repository ManagerOSS I can't find anything that creates a valid token.
However , when I hit npm login
from the mand line and type the Username and Password ,
the npm install
works.
How can we create a valid TOKEN for those Username/Password pair for the Nexus Artifactory , so I'll be able to use that token from a Docker ?
Share Improve this question asked Dec 23, 2020 at 12:26 JANJAN 21.9k66 gold badges189 silver badges336 bronze badges2 Answers
Reset to default 1It appears that authenticating w/ AuthTokens (i.e. User Token Realm ) is only available in Nexus Pro :
https://help.sonatype./repomanager3/nexus-repository-administration/user-authentication/security-setup-with-user-tokens
User tokens is available only in PRO version of Nexus (see parison), but you can use "Single sign-on patch for Nexus OSS" which provides an alternative implementation of tokens without violating the license. The creation of tokens is implemented through the "NuGet API Key" menu, however, the tokens themselves apply to all types of repositories. Example of usage user token:
Run Nexus container from image "ghcr.io/a-langer/nexus-sso:3.46.0":
git clone https://github./a-langer/nexus-sso.git cd ./nexus-sso docker pose up -d
Go to menu "Nexus -> Manage your user account -> NuGet API Key", press "Access API key".
Type your password or username if using SSO login, press "Authenticate".
Copy "Your NuGet API Key", press "Close" and "Sign out".
The received token can be used instead of a password in settings NPM, Docker, Maven and etc.
Each user can set a personal token that can be used instead of a password.
本文标签:
版权声明:本文标题:javascript - How to create a Token in Nexus (for private packages) ? can't create a token through its UI - Stack Overflo 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744289082a2599027.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论