Phillip Senn
Phillip Senn

Reputation: 47645

Error: "git" command line tool is not installed:

I'm trying to:

cordova plugins add https://github.com/wildabeast/BarcodeScanner.git

But I'm getting:

Error: "git" command line tool is not installed:
make sure it is accessible on your PATH.

So then I do this:

npm install -g git 

And it looks like it installed it here:

c:\Users\Phillip\AppData\Roaming\npm\node_modules\git

So should add that to my existing path?

C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\AdobeAIRSDK\bin;C:\Program Files (x86)\Windows Live\Shared;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\nodejs\;C:\apache-ant\bin;C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools;%JAVA_HOME%\bin;C:\AndroidDevelopmentKit\adt-bundle-windows-x86_64-20131030\sdk\platform-tools;C:\AndroidDevelopmentKit\adt-bundle-windows-x86_64-20131030\sdk\tools

Or should I add something other than c:\Users\Phillip\AppData\Roaming\npm\node_modules\git? Because I don't see an executable there.

Upvotes: 12

Views: 33305

Answers (5)

mukta
mukta

Reputation: 79

I also faced same problem and tried all above solutions but still I was getting same issue for that I checked my "Path" in environment variables and found that it was already having (C:\Program Files\Git\cmd;) in Path and i was adding (C:\Program Files\Git\bin;). So it was creating a conflict . Then i removed (C:\Program Files\Git\cmd;) and append (C:\Program Files\Git\bin;) this only in my Path. And close cmd and again type same add plugin command on the same directory and It Worked!!

Upvotes: 3

Santhosh Legent
Santhosh Legent

Reputation: 147

if you already install git, still you getting problem means me have two solution 1. add path in EV "C:\Program Files\Git\bin" and "C:\Program Files\Git\cmd". Restart machine.

2nd solution is uninstall and install(https://git-scm.com/downloads) aagin and do step1.

Upvotes: 3

verax
verax

Reputation: 173

start menu > system properties > system advanced config > environment variables. go to system variables and find "Path" variable, click on "edit" then go to the end of the value, and a semicolon (;) and paste your git route (mine is: C:\Program Files\Git\bin). save it and you're done.

Upvotes: 6

poke
poke

Reputation: 388313

npm install -g git

This will install the NPM package git (also known as node-git). This is not the same as the real Git that is available as a command line utility. The former NPM package is essentially a Node JS module to utilize Git functionality. And as the project explains, it also contains some actions natively, but for many others it will need to fall back to the command line utility.

So, you should just install the real Git.

Upvotes: 11

Atropo
Atropo

Reputation: 12561

You need to install the git executable. Check how to install it from the Windows section here: git installation or msysgit

Upvotes: 9

Related Questions