git 如何解决 npm install 中的身份验证错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44224567/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 12:46:56  来源:igfitidea点击:

How to resolve authentication error in npm install?

gitmavennpm-installpackage.json

提问by bier hier

In my package.json I have private repo called somerepo.git. Now I am running an npm install on a buildserver(bamboo) through maven and getting this error:

在我的 package.json 中,我有一个名为 somerepo.git 的私有仓库。现在我通过 maven 在 buildserver(bamboo) 上运行 npm install 并收到此错误:

[ERROR] npm ERR! Command failed: git clone --template=/var/home/ci/.npm/_git-remotes/_templates --mirror https://somerepo.git
[ERROR] npm ERR! fatal: Authentication failed for https://somerepo.git

How can I resolve the authentication for the repository?

如何解决存储库的身份验证?

采纳答案by VonC

If you can, you should:

如果可以,您应该: