PhoneGap" git"未安装命令行工具

时间:2013-10-08 19:02:35

标签: iphone ios git cordova command-line-interface

我按照phonegap网站安装说明使用Phonegap 3.0和命令行界面。 我在iOS上创建了一个应用程序:

npm install -g phonegap ...

phonegap create Test -n Test(创建一个名为“Test”的应用程序,位于“Test”文件夹中)

phonegap build ios 然后...

phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git 哪个回应这个错误:

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

现在,我已经尝试安装“git”命令行工具,但我不确定我是否正确安装,或者我是否正在下载正确的东西,或者如何将PATH对齐访问。

这里有什么建议吗?有没有人处理或看过这个?非常感谢你

3 个答案:

答案 0 :(得分:6)

嗨“git”也是一个节点模块。想要找到的最简单的方法是。

npm install -g git 

这会将git作为模块安装在您的节点源位置。

重启机器。

安装phonegap插件:

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

您将得到以下答复:

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.

希望这会非常有帮助。如果有任何问题回复。

答案 1 :(得分:1)

只需下载适用于Mac的git CLI工具:

http://git-scm.com/download/mac

答案 2 :(得分:1)

http://git-scm.com/downloads下载并安装git。在系统环境变量中设置指向安装路径的路径,在我的例子中为C:\ Program Files(x86)\ Git \ bin。

所以去控制面板 - > system - > Advance System Settings - >环境变量 - >系统变量

选择路径并编辑它。将C:\ Program Files(x86)\ Git \ bin附加到它。

它肯定会起作用。