3

我在使以下命令正常工作时遇到问题。我在 steroids.js 论坛上发帖,但这似乎更像是一个通用的 git 问题。url 上带有前导“git@”的所有 repo 都失败。

命令

npm install steroids -g

错误

npm ERR! git clone https://git@github.com/AppGyver/incubator-ripple.git Cloning into bare repository '/Users/kbaker/.npm/_git-remotes/https-git-github-com-AppGyver-incubator-ripple-git-2c417fa2'...
npm ERR! git clone https://git@github.com/AppGyver/incubator-ripple.git 

npm ERR! git clone https://git@github.com/AppGyver/ios-sim.git 
npm ERR! git clone https://git@github.com/AppGyver/ios-sim.git fatal: Unable to look up git@github.com (port 9418) (nodename nor servname provided, or not known)
npm ERR! Error: Command failed: fatal: Unable to look up git@github.com (port 9418) (nodename nor servname provided, or not known)

我下载了以下 npm 包的 github repo,调整了 packages.json 文件以使用不会失败的 repo url,但我仍然收到有关缺少包的错误。

我试过更新 npm 和 git 命令。这可能与我正在运行 zsh 的事实有关吗?

想法?

4

2 回答 2

4

您的克隆网址不正确。您正在使用:

https://git@github.com/AppGyver/incubator-ripple.git

要么使用 ssh:

git@github.com:AppGyver/incubator-ripple.git

或 https:

https://github.com/AppGyver/incubator-ripple.git

但不是两者

于 2014-06-18T05:01:12.537 回答
3

由于我的代理设置,我遇到了这个问题。

您可以尝试使用以下方法安装它:

npm install git+https://github.com/AppGyver/steroids -g

但我建议配置git以将git url 转换为https

git config --global url."https://".insteadOf git://

然后重试:

npm install steroids -g

于 2015-12-18T13:21:50.120 回答