[英]Cordova plugin from private GitHub repository
What is the preferred way to install a Cordova plugin from a private GitHub repository? 从私有GitHub存储库安装Cordova插件的首选方法是什么?
I have purchased a private plugin from a provider who granted my git account access to their private git repository. 我已从提供者那里购买了一个私有插件,该提供者授予了我的git帐户对其私有git存储库的访问权限。 Normally I install plugins from the cordova cli with: 通常,我使用以下命令从cordova cli安装插件:
cordova plugin add https://github.com/somePrivateRepo/purchasedPlugin.git
But this yielded the following error: 但这产生了以下错误:
Error: Failed to fetch plugin https://github.com/somePrivateRepo/purchasedPlugin.git via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: C:\Program Files\Git\cmd\git.exe: Command failed with exit code 1
28 Error output:
Cloning into 'C:\Users\xxxx\AppData\Local\Temp\git\1459346362064'...
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument
I know the URL is good as the GitHub desktop was able to clone the repository. 我知道URL很好,因为GitHub桌面能够克隆存储库。
The software provider who sold me the plugin told me this was a problem between me and GitHub. 向我出售该插件的软件提供商告诉我,这是我和GitHub之间的问题。
Feels like I am missing a key piece of information to make this work. 感觉我正在丢失一项重要的信息来完成这项工作。
I found I could install from the path where the GitHub desktop cloned. 我发现可以从GitHub桌面克隆的路径安装。 I used the following command: 我使用以下命令:
cordova plugin add /path/to/directory
I had the same issue. 我遇到过同样的问题。 Cordova changed its plugin loading at Cordova 7, so you should try using the --nofetch option to use the old loading method. Cordova在Cordova 7更改了其插件加载,因此您应该尝试使用--nofetch选项来使用旧的加载方法。
Your private plugin provider could also update his plugin to work with the new method; 您的私人插件提供商也可以更新其插件以使用新方法。 I found it just needed a package.json file creating to get mine working again. 我发现它只需要创建一个package.json文件即可使我的文件再次工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.