简体   繁体   English

我无法登录到 myGet npm 存储库 (sencha/extjs-ce)

[英]I cannot get logged into a myGet npm repository (sencha/extjs-ce)

I'm setting up a dev VirtualBox (Ubuntu) and I can't get logged into the private myGet repository through Npm.我正在设置一个开发 VirtualBox (Ubuntu),但无法通过 Npm 登录到私有 myGet 存储库。 I have error 403 Invalid Login.我有错误 403 无效登录。

I can connect to myGet site with my credentials.我可以使用我的凭据连接到 myGet 站点。

FYI, I am behind a secured proxy but other command line tool (composer, node, apt, curl) are working as I have set the env information.仅供参考,我支持安全代理,但其他命令行工具(composer、node、apt、curl)正在运行,因为我已经设置了 env 信息。

I also tried sudoed .我也试过sudoed

Update:更新:

npm login (without the --registry ...) works npm login (没有--registry ...)有效

user@user-VirtualBox:/var/www$ npm login  --registry=htps://sencha.myget.org/F/community/npm/ whoami
Username: maquejp..gmail.com
Password: 
Email: (this IS public) yoyo@gmail.com
npm ERR! code E403
npm ERR! Registry returned 403 for PUT on htps://sencha.myget.org/F/community/npm/-/user/org.couchdb.user:yoyo..gmail.com: Invalid login

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2019-03-25T15_08_42_242Z-debug.log
user@user-VirtualBox:/var/www$ cat /home/user/.npm/_logs/2019-03-25T15_08_42_242Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'login',
1 verbose cli   '--registry=htps://sencha.myget.org/F/community/npm/',
1 verbose cli   'whoami' ]
2 info using npm@5.8.0
3 info using node@v8.11.4
4 verbose npm-session 62efce47a150f6d5
5 verbose web login before first POST
6 http request → POST htps://sencha.myget.org/F/community/npm/-/v1/login
7 http 404 ← Not Found (htps://sencha.myget.org/F/community/npm/-/v1/login)
8 verbose web login not supported, trying couch
9 verbose login before first PUT { _id: 'org.couchdb.user:yoyo..gmail.com',
9 verbose login   name: 'yoyo..gmail.com',
9 verbose login   password: 'XXXXX',
9 verbose login   type: 'user',
9 verbose login   roles: [],
9 verbose login   date: '2019-03-25T15:08:40.165Z' }
10 http request → PUT htps://sencha.myget.org/F/community/npm/-/user/org.couchdb.user:yoyo..gmail.com
11 http 403 ← { "error": "Invalid login", "reason": "The specified login is not valid." } (htps://sencha.myget.org/F/community/npm/-/user/org.couchdb.user:yoyo..gmail.com)

You have wrong url in registry:您在注册表中有错误的网址:

--registry=htps://sencha.myget.org/F/community/npm/

Try: --registry=https://sencha.myget.org/F/community/npm/试试: --registry=https://sencha.myget.org/F/community/npm/

As updated by Jean-Philippe:正如让-菲利普更新的那样:

npm login (without the --registry...) works npm 登录(没有 --registry...)有效

Doing that works.这样做有效。

I had that problem on the ubuntu bash on Windows 10.我在 Windows 10 上的 ubuntu bash 上遇到了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM