NPM 安装导致 401 Unauthorized for private repo [英] NPM install resulting in 401 Unauthorized for private repo
本文介绍了NPM 安装导致 401 Unauthorized for private repo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 package.json
的依赖项中有以下行:
I have the following line in my dependencies in package.json
:
"log": "https://git.mydomain.com/myproject/myrepo/repository/archive.tar.gz?ref=0.1.0",
我得到以下信息:
km@Karls-MBP ~/dev/vertica (km/ref) $ npm install
npm ERR! code E401
npm ERR! 404 401 Unauthorized: log@https://git.mydomain.com/myproject/myrepo/repository/archive.tar.gz?ref=0.5.0
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/km/.npm/_logs/2018-02-16T08_49_38_669Y-debug.log
我不知道问题是 GitLab(存在 repo 的地方)还是 NPM.
I don't know if the issue is GitLab (where the repo exists) or NPM.
- 节点 v8.9.4
- NPM v5.6.0
推荐答案
从主目录中删除 .npmrc,它应该可以工作.我做了同样的事情,它对我有用.
Remove .npmrc from the Home Directory, it should be able to work. I did the same and it works for me.
这篇关于NPM 安装导致 401 Unauthorized for private repo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文