首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm install - git问题

npm install - git问题
EN

Stack Overflow用户
提问于 2014-06-18 10:07:46
回答 2查看 22.1K关注 0票数 3

我在执行以下命令时遇到了问题。我在steroids.js论坛上发表了帖子,但这似乎更像是一个通用的git问题。所有在url上带有前导"git@“的repo都失败了。

命令

代码语言:javascript
复制
npm install steroids -g

错误

代码语言:javascript
复制
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存储库,调整了packages.json文件以使用不会失败的repo url,但我仍然收到关于缺少包的错误。

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

有什么想法?

EN

回答 2

Stack Overflow用户

发布于 2014-06-18 13:01:13

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

代码语言:javascript
复制
https://git@github.com/AppGyver/incubator-ripple.git

使用ssh:

代码语言:javascript
复制
git@github.com:AppGyver/incubator-ripple.git

或者https:

代码语言:javascript
复制
https://github.com/AppGyver/incubator-ripple.git

但不是两个都有

票数 4
EN

Stack Overflow用户

发布于 2015-12-18 21:21:50

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

您可以尝试使用以下命令进行安装:

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

但我建议使用以下命令配置git以将git urls转换为https

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

然后重试:

npm install steroids -g

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24276026

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档