已安装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
建议的解决方案是什么?
当前回答
在node.js命令提示符下执行以下命令,其中“<git path>”是git bin文件夹的路径:
set PATH=%PATH%;<git path>;
就像这样:
set PATH=%PATH%;C:\Program Files\Git\bin;
或者这个:(注意(x86))
set PATH=%PATH%;C:\Program Files (x86)\Git\bin;
这将把git添加到路径变量中。确保你输入正确,否则你可能会删除你的路径变量,这将是糟糕的。
其他回答
当你运行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
我在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
我通过从下载Git Bash安装Git Bash解决了这个问题。
在安装软件时设置此选项3,如下图所示。
最后使用Bash右键单击选择项目文件夹,如下所示。
和类型
npm安装
. 这对我很管用。
确保从列表中选择第二个或第三个选项来安装Git。它将通过自动修改PATH穿透Git命令到cmd;)