已安装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 Bash或Git Shell,然后进入您的项目(与在命令提示符中使用“cd path”的方式相同)。Git Shell默认安装Github windows安装。
然后运行相同的bower install命令。它将按预期工作。
下面的截图显示了使用Git Shell的命令
其他回答
我在Windows上也有同样的错误。添加git到路径解决了这个问题。
G:\Dropbox\Development\xampp\htdocs.penfolds.git\penfolds-atg-development>bower install
bower bootstrap#~3.0.0 ENOGIT git is not installed or not in the PATH
G:\>PATH
PATH=E:\Program Files\Windows Resource Kits\Tools\;
G:\Dropbox\Development\xampp\htdocs.penfolds.git\penfolds-atg-development>set PATH=%PATH%;E:\Program Files\Git\bin;
G:\Dropbox\Development\xampp\htdocs.penfolds.git\penfolds-atg-development>bower install
bower bootstrap#~3.0.0 not-cached git://github.com/twbs/bootstrap.git#~3.0.0
bower bootstrap#~3.0.0 resolve git://github.com/twbs/bootstrap.git#~3.0.0
在Windows上,您可以尝试在命令提示符处设置路径:
set PATH=%PATH%;C:\Program Files\Git\bin;
只需使用Git Bash而不是cmd。
NPM安装从git bash为我工作。 重启电脑后。
我也从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;