composer-asset-plugin icon indicating copy to clipboard operation
composer-asset-plugin copied to clipboard

[npm] fatal: Unable to find remote helper for 'git+https'

Open vercotux opened this issue 4 years ago • 3 comments

It seems there is an issue with some NPM packages which specify their dependencies in a format which uses "git+https" as the URL protocol.

This is the error I get during composer update -vvv:

[RuntimeException]                                                                                                                                                      
Failed to execute git clone --mirror 'git+https://github.com/vibornoff/asmcrypto.js' '/home/myname/.composer/cache/vcs/git-https---github.com-vibornoff-asmcrypto.js/'                                                                                                                                                                          
Cloning into bare repository '/home/myname/.composer/cache/vcs/git-https---github.com-vibornoff-asmcrypto.js'...                                                        
fatal: Unable to find remote helper for 'git+https' 

Here is one example of such an NPM package: meganz/jodid25519

The format used is a valid format. Possible URL protocols in npm package.json dependencies: git, git+ssh, git+http, git+https, git+file

vercotux avatar Apr 16 '20 02:04 vercotux

The error comes from Git which does not support git+https. However, NPM and Yarn know how to use it, so we should convert this url to https:// only.

francoispluchino avatar Apr 16 '20 11:04 francoispluchino

Try the install/update with the --prefer-dist option, in this case, Git is not used.

francoispluchino avatar Apr 16 '20 11:04 francoispluchino

It appears the logic for this already exists. But why is it not working?

vercotux avatar Oct 18 '20 10:10 vercotux