来自私人GitHub存储库的Cordova插件



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

我从一家供应商那里购买了一个私人插件,该供应商允许我的git帐户访问他们的私人git存储库。通常我从cordova 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 FilesGitcmdgit.exe: Command failed with exit code 1
    28 Error output:
    Cloning into 'C:UsersxxxxAppDataLocalTempgit1459346362064'...
    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

我知道URL很好,因为GitHub桌面能够克隆存储库。

卖给我插件的软件提供商告诉我,这是我和GitHub之间的问题。

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

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

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

cordova plugin add /path/to/directory

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

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

最新更新