On Gitbash - Bower: ENOGIT git is not installed or not in PATH

I have a project with a bower.json file and I am trying to load all of its bower libraries on Windows. I turn on Gitbash, cd into that project directory, and type update bower install / bower. I am getting the error:

bower ENOGIT        git is not installed or not in the PATH

      

But there is a path to git:

$ which git
/bin/git

      

So a weird thing that actually works in cmd on Windows , but it doesn't work with Gitbash . This is the value I have in the system PATH variable in relation to git:

C:\Program Files (x86)\Develop\VCS\Git\cmd

      

I tried to reinstall msysgit and chose the option: Run Git From Windows Command Prompt, e.g .:

enter image description here

It still doesn't work.

Bower version:

$ bower --version
1.4.1

      

Git version:

$ git --version
git version 1.9.5.msysgit.1

      

  • Bower is installed globally using npm

EDIT: I found the cause of this problem: I have a file in my profile home directory .bashrc that I usually use to define common aliases, etc., and I added this line:

export PATH="~/AppData/Roaming/Composer/vendor/bin":$PATH

      

And somehow when this line is present I get an error in Gitbash, but that just adds the path to the composer's global packages, what should it do with Git itself or conversation?

+3


source to share


3 answers


Check out this solution posted by saurabhkohli in this GitHub question :



[U] pdating the PATH environment variable with the currently set GIT location on your system will help fix this issue or you can update it on the NodeJS command line using "set PATH=%PATH%;C:\Program Files\Git\bin;"

+2


source


I just ran into the same problem while trying to use the Windows Command Prompt. It turns out you need to select this option twice and I missed the second one.

Here are some screenshots if any help for anyone:

i



The one I missed: j

After reinstalling with the above settings, everything looks fine.

+1


source


Try unzipping the portable Git in a simpler path (no space).
Get the latest version of Git on the Windows: PortableGit-2.4.5.1-4th-release-candidate-64-bit.7z.exe

.
(no configuration required, just an archive with automatic extraction)

Remove PATH

old msysgit and add C:\path\to\PortableGit-2.4.5.1-4th-release-candidate-64-bit\bin

to %PATH%

.

0


source







All Articles