Bower: ENOGIT Git is not installed or not in the PATH

Bower: ENOGIT Git is not installed or not in the PATH

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?

Solutions/Answers:

Solution 1:

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.

  1. Right-click on My Computer -> Properties
  2. Click Advanced System Settings link from the left side column
  3. Click Environment Variables in the bottom of the window
  4. Then under System Variables look for the path variable and click edit
  5. 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.

Related:  Javascript how to split newline

This is image showing you how to do so!

Source: Adding Git to Windows 7 Path

Solution 2:

Just use the Git Bash instead of cmd.

Solution 3:

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:

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 😉

Enter image description here

Solution 5:

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:

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.

Related:  Re-using Backbone.js models on the server side with Node.js and Websockets

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.

The below screenshot shows the command using Git Shell
Bower install using Git Shell