Bower: ENOGIT Git is not installed or not in the PATH
JavascriptGitBowerJavascript Problem Overview
Git is installed and is in the path.
Platform: Red Hat Enterprise Linux 5.8.
>which git
/usr/local/bin/git
Yet bower can't find it:
bower angular#1.0.6 ENOGIT git is not installed or not in the PATH
What is the recommended work-around?
Javascript Solutions
Solution 1 - Javascript
Adding Git to Windows 7/8/8.1 Path
Note: You must have msysgit installed on your machine. Also, the path to my Git installation is "C:\Program Files (x86)\Git". Yours might be different. Please check where yours is before continuing.
Open the Windows Environment Variables/Path Window.
-
Right-click on My Computer -> Properties
-
Click Advanced System Settings link from the left side column
-
Click Environment Variables in the bottom of the window
-
Then under System Variables look for the path variable and click edit
-
Add the pwd to Git's binary and cmd at the end of the string like this:
;%PROGRAMFILES(x86)%\Git\bin;%PROGRAMFILES(x86)%\Git\cmd
Now test it out in PowerShell. Type git
and see if it recognizes the command.
Source: Adding Git to Windows 7 Path
Solution 2 - Javascript
Just use the Git Bash instead of cmd.
Solution 3 - Javascript
Run the following command at your node.js command prompt where "<git path>" is the path to your git bin folder:
set PATH=%PATH%;<git path>;
So, like this:
set PATH=%PATH%;C:\Program Files\Git\bin;
Or this: (Notice the (x86) )
set PATH=%PATH%;C:\Program Files (x86)\Git\bin;
This will add git to your path variables. Be sure you type it correctly or you could possibly delete your path vars which would be bad.
Solution 4 - Javascript
Make sure you installed Git with the second or third option selected from the list. It will penetrate the Git command to cmd by modifying PATH automatically ;)
Solution 5 - Javascript
I had the same error in Windows. Adding git to the path fixed the issue.
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
Solution 6 - Javascript
I am also getting the same error and the solution is first to check if the Git is installed or not in the system and if not please install it.
After installation, open Git Bash or Git Shell from Windows and go to your project (same way you go in command prompt using "cd path"). Git Shell is installed by default with Github windows installation.
Then run the same bower install command. It will work as expected.
Solution 7 - Javascript
On Windows, you can try to set the path at the command prompt:
set PATH=%PATH%;C:\Program Files\Git\bin;
Solution 8 - Javascript
When you ran the git install, you probably didn't choose:
"Use Git from the Windows Command Prompts"
during the installation.
Re-run git install, and choose that option.
Solution 9 - Javascript
You are missing the ENVIRONMENT PATH. Follow these steps:
- Search for 'Edit the system environment variables'.
- Click on 'Environment Variables'.
- In the 'System variables' section, scroll down and click on the variable 'Path'. Click 'Edit'.
- Append this text to the end of the 'Variable value'.
> ;%PROGRAMFILES%\Git\bin;%PROGRAMFILES%\Git\cmd
Solution 10 - Javascript
I also got the same problem from cmd and resolved using the following steps.
First install the https://msysgit.github.io/ (if not alredy installed). Then set the Git path as suggested by skinneejoe:
set PATH=%PATH%;C:\Program Files\Git\bin;
Or this (notice the (x86)):
set PATH=%PATH%;C:\Program Files (x86)\Git\bin;
Solution 11 - Javascript
In Linux:
if you dont have installed git use:
sudo apt-get update
sudo apt-get install git
with command which git
you will know the directory where is and then add in path if it is not in that enviroment variable.
Solution 12 - Javascript
I bumped into this problem on a cPanel CentOS 6 linux machine. The solution for me was to symlink the cPanel git to /usr/local/bin/git
ln -s /usr/local/cpanel/3rdparty/bin/git /usr/local/bin/git
Solution 13 - Javascript
1.Set the Path of Git in environment variables. 2.From Windows command prompt, run cd Project\folder\Path\ run the command: bower install
Solution 14 - Javascript
I solved the problem by install Git Bash from [Download Git Bash][1].
Setting this option 3 when installing the software as shown bellow.
[![Setting Path variable][2]][2]
Finally select the project folder by right click using Bash as shown below.
[![enter image description here][3]][3]
and type
> npm install
. It works for me.
[1]: https://git-scm.com/downloads "Git Bash Download Link" [2]: https://i.stack.imgur.com/Uidsf.png [3]: https://i.stack.imgur.com/eOAFR.png
Solution 15 - Javascript
npm install
from git bash did work for me.
After rebooting PC.
Solution 16 - Javascript
Just use the Git Bash instead of node.js or command prompt
As an Example for installing ReactJS, after opening Git Bash, execute the following command to install react:
bower install --react
Solution 17 - Javascript
I had the same problem and needed to restart the cmd - and the problem goes away.