Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to add plugins with Cordova 3.3.0 CLI on Windows - '"git" command line tool is not installed: ..."

I am having trouble adding a plugin to Cordova 3.3.0 on Windows. I have node.js installed. I have been able to create a project. I have git installed and the git bin directory is on my PATH. I am able to run git on the windows command line. But when I try to install a plugin I get this error:

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

This sequence of commands works up until I try and add the plugin:

  • cordova create myProject
  • cd myProject
  • cordova platform add android
  • cordova plugin ls

Then I try to add the plugin with the following and it fails:

  • cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git

I have spent a whole day trying to figure this out. Any ideas?

like image 384
DChung Avatar asked Dec 31 '13 04:12

DChung


4 Answers

Download and install git from http://git-scm.com/downloads . Set path in System Environment variable pointing to the installation path, in my case C:\Program Files (x86)\Git\bin.

So go to control panel-> system ->Advance System Settings -> Environment Variable -> System Variable

Select Path and Edit it. Append C:\Program Files (x86)\Git\bin to it.

That's it. If it still doesn't work run git once from programs. It will work for sure.

like image 112
AB D CHAMP Avatar answered Oct 03 '22 18:10

AB D CHAMP


Yes, the below solution worked for me download and install git from http://git-scm.com/downloads . Set path in System Environment variable pointing to the installation path, in my case C:\Program Files (x86)\Git\bin.

So go to control panel-> system ->Advance System Settings -> Environment Variable -> System Variable

Select Path and Edit it. Append C:\Program Files (x86)\Git\bin to it.

That's it. If it still doesn't work run git once from programs. It will work for sure.

like image 33
Ragu Avatar answered Oct 03 '22 19:10

Ragu


1.) Search for the 'Git Shell' application on Windows Search. If you find it, skip to step 3.

2.) So, you did not find Git Shell.Download and install Github for Windows from http://windows.github.com/,

3.) Open Git Shell, which is a Git-enabled version of Windows CMD. Run your plugin install command from the Git Shell, and it should run.

The only difference of this method from DChamp's solution is that you won't need to bother with modifying path yourself, if you use Git Shell.

like image 36
Saraj Munjal Avatar answered Oct 03 '22 18:10

Saraj Munjal


Here is the exact solution.

Hi "git" is also a node module.

npm install -g git

This will install git in you node source location as a module. Restart the machine.

Install phonegap plugin: C:\Users\user1\yourprojectname>cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git

You will get response as: Fetching plugin from "https://git-wip-us.apache.org/repos/asf/cordova-plugin-cam era.git"... Starting installation of "org.apache.cordova.camera" for android Preparing android project org.apache.cordova.camera installed on android.

Hope this will be very helpful. If any issue reply.

like image 39
Nithyanandan Sathiyanathan Avatar answered Oct 03 '22 18:10

Nithyanandan Sathiyanathan