What is the preferred way to install a Cordova plugin from a private GitHub repository?
I have purchased a private plugin from a provider who granted my git account access to their private git repository. Normally I install plugins from the cordova cli with:
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.
The software provider who sold me the plugin told me this was a problem between me and 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. 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.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.