我在 github 上有一个私有(private)仓库,它依赖于其他私有(private) github 仓库和 npm install
安装所有依赖项没有问题。
我安装了 Yarn(在 MacOS 上)并尝试运行 yarn
在命令行中,但它无法克隆私有(private)依赖项,并出现以下错误:
ssh: Could not resolve hostname github: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
如何让 yarn 安装模块?谢谢!
最佳答案
Yarn@0.16.0 通过替换类型的 url 来工作
"private-test": "git+ssh://git@github.com:ramasilveyra/private-test.git#d6c5789"
和
"private-test": "git+ssh://git@github.com/ramasilveyra/private-test.git#d6c5789"
替换
:
带有 /
的冒号让它工作。
关于npm - yarn : unable to clone private github repo. ssh : Could not resolve hostname github: nodename nor servname provided, 或未知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40016023/