已安装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
建议的解决方案是什么?
当前回答
我也从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;
其他回答
我在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
在Linux中:
如果你没有安装git,请使用:
sudo apt-get update
sudo apt-get install git
使用命令,你将知道目录在哪里,然后添加路径,如果它不在那个环境变量。
添加Git到Windows 7/8/8.1路径下
注意:必须在计算机上安装msysgit。另外,我的Git安装路径是“C:\Program Files (x86)\Git”。你的情况可能不同。继续之前请检查一下你的位置。
打开Windows环境变量/路径窗口。
右键单击我的电脑->属性 单击左边栏中的高级系统设置链接 单击窗口底部的“环境变量” 然后在“系统变量”下查找路径变量并单击“编辑” 将pwd添加到Git的二进制文件和字符串末尾的cmd中,如下所示: Git; % PROGRAMFILES (x86) % \ \ bin; % PROGRAMFILES (x86) % \ Git \ cmd
现在在PowerShell中测试它。输入git,看看它是否能识别这个命令。
来源:添加Git到Windows 7路径
当你运行git安装时,你可能没有选择:
从Windows命令提示使用Git
安装过程中。
重新运行git install,并选择该选项。
只需使用Git Bash而不是cmd。