从私有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之间的一个问题。
我觉得我错过了一个关键的信息,使这一工作。
发布于 2016-03-30 15:43:20
我发现我可以从GitHub桌面克隆的路径安装。我使用了以下命令:
cordova plugin add /path/to/directory发布于 2017-12-08 17:57:25
我也有过同样的问题。Cordova更改了它在Cordova 7上的插件加载,所以您应该尝试使用-nofetch选项来使用旧的加载方法。
您的私有插件提供商也可以更新他的插件以使用新的方法;我发现它只是需要创建一个package.json文件才能让我的插件再次工作。
https://stackoverflow.com/questions/36313178
复制相似问题