2016-03-30 75 views
2

从私人GitHub存储库安装Cordova插件的首选方式是什么?来自私人GitHub存储库的Cordova插件

我已经从提供者那里购买了一个私人插件,他们授予我的git账户访问其私人git存储库的权限。通常我从科尔多瓦CLI安装插件有:

cordova plugin add https://github.com/somePrivateRepo/purchasedPlugin.git 

但得到以下错误:

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 

我知道网址是好的,GitHub的桌面能够克隆库。

向我出售插件的软件提供商告诉我这是我和GitHub之间的问题。

  1. 我应该能够从Cordova plugin add命令安装插件吗?
  2. 有没有更好的解决方案,我没有想到?
  3. 我应该从GitHub桌面GUI克隆,然后将这些文件复制并粘贴到我的项目中?
  4. 这是一个GitHub问题?
  5. 这是一个科尔多瓦问题?
  6. 这是私人插件卖家的问题吗?

感觉就像我错过了一个关键信息,使这项工作。

+0

嗨,我面临同样的问题。你能够使用github链接添加吗? – NewOne

回答

5

我发现我可以从GitHub桌面克隆的路径安装。我用了下面的命令:

cordova plugin add /path/to/directory 
0

我有同样的问题。 Cordova在Cordova 7中更改了它的插件加载,因此您应该尝试使用--nofetch选项来使用旧的加载方法。

您的私有插件提供者也可以更新他的插件以使用新方法;我发现它只需要创建一个package.json文件来让我的工作重新开始。