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

后端 未结 16 1373
时光说笑
时光说笑 2020-11-29 14:52

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

相关标签:
16条回答
  • 2020-11-29 15:23

    You are missing the ENVIRONMENT PATH. Follow these steps:

    1. Search for 'Edit the system environment variables'.
    2. Click on 'Environment Variables'.
    3. In the 'System variables' section, scroll down and click on the variable 'Path'. Click 'Edit'.
    4. Append this text to the end of the 'Variable value'.

    ;%PROGRAMFILES%\Git\bin;%PROGRAMFILES%\Git\cmd

    0 讨论(0)
  • 2020-11-29 15:25

    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
    
    0 讨论(0)
  • 2020-11-29 15:25

    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
    
    0 讨论(0)
  • 2020-11-29 15:28

    npm install from git bash did work for me. After rebooting PC.

    0 讨论(0)
  • 2020-11-29 15:30

    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.

    This is image showing you how to do so!

    Source: Adding Git to Windows 7 Path

    0 讨论(0)
  • 2020-11-29 15:32

    I had the same problem and needed to restart the cmd - and the problem goes away.

    0 讨论(0)
提交回复
热议问题