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:
Then I try to add the plugin with the following and it fails:
I have spent a whole day trying to figure this out. Any ideas?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With