已安装Git并在路径中。
平台:Red Hat Enterprise Linux 5.8。
>which git
/usr/local/bin/git
然而鲍尔却找不到它:
bower angular#1.0.6 ENOGIT git is not installed or not in the PATH
建议的解决方案是什么?
已安装Git并在路径中。
平台:Red Hat Enterprise Linux 5.8。
>which git
/usr/local/bin/git
然而鲍尔却找不到它:
bower angular#1.0.6 ENOGIT git is not installed or not in the PATH
建议的解决方案是什么?
当前回答
当你运行git安装时,你可能没有选择:
从Windows命令提示使用Git
安装过程中。
重新运行git install,并选择该选项。
其他回答
我在一台cPanel CentOS 6 linux机器上遇到了这个问题。 我的解决方案是将cPanel git符号链接到/usr/local/bin/git
ln -s /usr/local/cpanel/3rdparty/bin/git /usr/local/bin/git
确保从列表中选择第二个或第三个选项来安装Git。它将通过自动修改PATH穿透Git命令到cmd;)
在Windows上,您可以尝试在命令提示符处设置路径:
set PATH=%PATH%;C:\Program Files\Git\bin;
只需使用Git Bash,而不是node.js或命令提示符
以安装ReactJS为例,打开Git Bash后,执行以下命令安装react:
bower install --react
我也从cmd中得到了相同的问题,并使用以下步骤解决。
首先安装https://msysgit.github.io/(如果还没有安装)。 然后按照skinneejoe的建议设置Git路径:
set PATH=%PATH%;C:\Program Files\Git\bin;
或者这个(注意(x86)):
set PATH=%PATH%;C:\Program Files (x86)\Git\bin;