git Phonegap 使用命令行工具添加插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17849702/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:49:48  来源:igfitidea点击:

Phonegap adding plugin using command line tool

gitnode.jscordovaphonegap-plugins

提问by Butani Vijay

I am new in phonegap, i go through steps define in phonegap official site for creating project using command line tool(nodejs). i success to create project and adding platform but,

我是 phonegap 的新手,我通过在 phonegap 官方网站中定义的步骤使用命令行工具(nodejs)创建项目。我成功地创建了项目并添加了平台,但是,

following error occur when i am trying to add plugin.

当我尝试添加插件时发生以下错误。

Command :

命令 :

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status.git

error :

错误 :

[Error: Error fetching plugin: Error: git command line is not installed]

how can i resolve this error and how can i install git command line?

如何解决此错误以及如何安装 git 命令行?

Thanks in advance.

提前致谢。

回答by Wen

You could install git command line for Mac OS Xin here, and then try run that again.
For Windows, download Git on code.google.com/p/msysgit.
Then: git clone git://project.url.here

您可以在此处Mac OS X安装 git 命令行,然后再次尝试运行。对于 Windows,请在code.google.com/p/msysgit上下载 Git 。然后: git clone git://project.url.here

回答by Butani Vijay

Error shown that you have not installed git command line tool. if you want to use git command first you need to install git command line tool. then you can add plugins ass per your requirements.

错误显示您尚未安装 git 命令行工具。如果你想先使用 git 命令,你需要安装 git 命令行工具。然后您可以根据您的要求添加插件。

回答by J8lug

The Site for git on Windows has moved to: http://msysgit.github.io/

Windows 上的 git 站点已移至:http: //msysgit.github.io/