fxpio / composer-asset-plugin

NPM/Bower Dependency Manager for Composer
MIT License
893 stars 156 forks source link

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

Open vercotux opened 4 years ago

vercotux commented 4 years ago

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

francoispluchino commented 4 years ago

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 commented 4 years ago

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

vercotux commented 3 years ago

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