我正在尝试通过 npm 安装 github 私有存储库,其中包括其他私有 github 存储库作为依赖项。
尝试了很多方法和帖子,但没有一个有效。这是我正在做的事情:
npm install git+https://github.com/myusername/mygitrepository.git
在 package.json 中是这样的:
"dependencies": {
"repository1name": "git+https://github.com/myusername/repository1.git",
"repository2name": "git+https://github.com/myusername/repository2.git"
}
正确的方法是什么?
原文由 vashishatashu 发布,翻译遵循 CC BY-SA 4.0 许可协议
以下在我需要的所有情况下都可以正常工作: