【问题标题】:Cordova plugin from private GitHub repository来自私有 GitHub 存储库的 Cordova 插件
【发布时间】:2016-03-30 15:23:34
【问题描述】:

从私有 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 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

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

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

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

感觉我错过了完成这项工作的关键信息。

【问题讨论】:

  • 嗨,我也面临同样的问题。您可以使用 github 链接添加吗?

标签: git cordova github plugins private


【解决方案1】:

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

cordova plugin add /path/to/directory

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-31
      • 2018-12-13
      • 1970-01-01
      • 2017-02-03
      • 1970-01-01
      • 1970-01-01
      • 2018-01-06
      • 2018-11-27
      相关资源
      最近更新 更多