【问题标题】:Can't clone git repository after installing latest version npm安装最新版本 npm 后无法克隆 git 存储库
【发布时间】:2018-02-08 15:07:32
【问题描述】:

我刚刚下载并安装了 node 和最新版本的 npm。 当我尝试克隆 git 存储库时,我得到了

"'git' 不是内部或外部命令、可运行程序或批处理文件。"错误

我尝试专门从 npm 安装 git,它似乎安装了一些包,但在尝试克隆时仍然看到相同的消息。

知道怎么解决吗?

【问题讨论】:

标签: node.js git npm


【解决方案1】:

Git 不是通过 npm 安装的。您找到的包对 git repos 有作用(不知道,从未使用过 - 只是快速浏览一下它的描述),但它没有安装 git。

要在 linux 上安装 git,https://git-scm.com/download/linux

要在 Windows 上安装 git,https://git-scm.com/download/windows

在mac上安装git,(你可能已经猜到链接了)https://git-scm.com/download/mac

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-05-03
    • 1970-01-01
    • 1970-01-01
    • 2021-11-12
    • 2021-09-01
    • 2018-11-23
    • 2012-03-30
    • 1970-01-01
    相关资源
    最近更新 更多