fxpio / composer-asset-plugin

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

Strange issue with failed git cloning #187

Closed nazar-pc closed 8 years ago

nazar-pc commented 8 years ago

My composer.json is as following:

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "modules/Composer",
                "version": "1.0.0+1.0.0-alpha11+git+cs-1.2.0",
                "require": [],
                "dist": {
                    "url": "/web/cscms.org/www/components/modules/Composer/empty.zip",
                    "type": "zip"
                },
                "replace": {
                    "nazar-pc/bananahtml": "*",
                    "nazar-pc/upf": "*",
                    "phpmailer/phpmailer": "*"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "modules/Test",
                "version": "1.0.0+1.0",
                "require": {
                    "bower-asset/bootstrap": "3.3.6",
                    "bower-asset/d3": "3.5.14",
                    "npm-asset/bootstrap-dialogs": "*"
                },
                "dist": {
                    "url": "/web/cscms.org/www/components/modules/Composer/empty.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "modules/WebSockets",
                "version": "1.0.0+0.47.0+build-72",
                "require": {
                    "cboden/ratchet": "0.3.*",
                    "ratchet/pawl": "0.1.*"
                },
                "dist": {
                    "url": "/web/cscms.org/www/components/modules/Composer/empty.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "plugins/Composer_assets",
                "version": "1.0.0+1.0.0+build-16",
                "require": {
                    "fxp/composer-asset-plugin": "^1.1.0",
                    "oyejorge/less.php": "~1.7",
                    "leafo/scssphp": "^0.6.2"
                },
                "dist": {
                    "url": "/web/cscms.org/www/components/modules/Composer/empty.zip",
                    "type": "zip"
                },
                "replace": {
                    "bower-asset/iron-flex-layout": "*",
                    "bower-asset/html.sortable": "*",
                    "bower-asset/jquery": "*",
                    "bower-asset/jssha": "*",
                    "bower-asset/polymer": "*",
                    "bower-asset/webcomponentsjs": "*",
                    "npm-asset/html5sortable": "*",
                    "npm-asset/jquery": "*",
                    "npm-asset/jssha": "*",
                    "npm-asset/polymer": "*",
                    "npm-asset/webcomponents.js": "*"
                }
            }
        }
    ],
    "require": {
        "modules/Composer": "1.0.0+1.0.0-alpha11+git+cs-1.2.0",
        "modules/Test": "1.0.0+1.0",
        "modules/WebSockets": "1.0.0+0.47.0+build-72",
        "plugins/Composer_assets": "1.0.0+1.0.0+build-16"
    }
}

But I'm getting strange issue with NPM package html5sortable. I can install it using regular npm cli, I can easily clone it with git command as below, but when using this plugin constantly getting this:

Adding VCS repository npm-asset/html5sortable
Executing command (CWD): git clone --mirror 'git+ssh://git@github.com/voidberg/html5sortable.git' '/web/cscms.org/www/storage/Composer/home/cache/vcs/git-ssh---git-github.com-voidberg-html5sortable.git/'
Executing command (CWD): git --version

  [RuntimeException]                                                                                                                                                                                    
  Failed to execute git clone --mirror 'git+ssh://git@github.com/voidberg/html5sortable.git' '/web/cscms.org/www/storage/Composer/home/cache/vcs/git-ssh---git-github.com-voidberg-html5sortable.git/'  
  Cloning into bare repository '/web/cscms.org/www/storage/Composer/home/cache/vcs/git-ssh---git-github.com-voidberg-html5sortable.git'...                                                              
  Permission denied (publickey).                                                                                                                                                                        
  fatal: Could not read from remote repository.                                                                                                                                                         
  Please make sure you have the correct access rights                                                                                                                                                   
  and the repository exists.                                                                                                                                                                            

Exception trace:
 () at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Util/Git.php:227
 Composer\Util\Git->throwException() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Util/Git.php:156
 Composer\Util\Git->runCommand() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Repository/Vcs/GitDriver.php:80
 Composer\Repository\Vcs\GitDriver->initialize() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Repository/VcsRepository.php:87
 Composer\Repository\VcsRepository->getDriver() at /web/cscms.org/www/storage/Composer/vendor/fxp/composer-asset-plugin/Repository/AbstractAssetVcsRepository.php:121
 Fxp\Composer\AssetPlugin\Repository\AbstractAssetVcsRepository->initDriver() at /web/cscms.org/www/storage/Composer/vendor/fxp/composer-asset-plugin/Repository/AssetVcsRepository.php:39
 Fxp\Composer\AssetPlugin\Repository\AssetVcsRepository->initialize() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Repository/ArrayRepository.php:179
 Composer\Repository\ArrayRepository->getPackages() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/DependencyResolver/Pool.php:104
 Composer\DependencyResolver\Pool->addRepository() at /web/cscms.org/www/storage/Composer/vendor/fxp/composer-asset-plugin/Repository/Util.php:60
 Fxp\Composer\AssetPlugin\Repository\Util::addRepositoryInstance() at /web/cscms.org/www/storage/Composer/vendor/fxp/composer-asset-plugin/Repository/Util.php:39
 Fxp\Composer\AssetPlugin\Repository\Util::addRepository() at /web/cscms.org/www/storage/Composer/vendor/fxp/composer-asset-plugin/Repository/AbstractAssetsRepository.php:139
 Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository->whatProvides() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/DependencyResolver/Pool.php:199
 Composer\DependencyResolver\Pool->computeWhatProvides() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/DependencyResolver/Pool.php:188
 Composer\DependencyResolver\Pool->whatProvides() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:221
 Composer\DependencyResolver\RuleSetGenerator->addRulesForPackage() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:293
 Composer\DependencyResolver\RuleSetGenerator->addRulesForJobs() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:333
 Composer\DependencyResolver\RuleSetGenerator->getRulesFor() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/DependencyResolver/Solver.php:208
 Composer\DependencyResolver\Solver->solve() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Installer.php:523
 Composer\Installer->doInstall() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Installer.php:232
 Composer\Installer->run() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Command/UpdateCommand.php:158
 Composer\Command\UpdateCommand->execute() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/vendor/symfony/console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/vendor/symfony/console/Application.php:844
 Symfony\Component\Console\Application->doRunCommand() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/vendor/symfony/console/Application.php:192
 Symfony\Component\Console\Application->doRun() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Console/Application.php:166
 Composer\Console\Application->doRun() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/vendor/symfony/console/Application.php:123
 Symfony\Component\Console\Application->run() at phar:///web/cscms.org/www/components/modules/Composer/composer.phar/src/Composer/Console/Application.php:99
 Composer\Console\Application->run() at /web/cscms.org/www/components/modules/Composer/Composer.php:128
 cs\modules\Composer\Composer->update() at /web/cscms.org/www/components/modules/Composer/Composer.php:65
 cs\modules\Composer\Composer->force_update() at /web/cscms.org/www/components/modules/Composer/api/index.post.php:22
 include() at /web/cscms.org/www/core/thirdparty/upf.php:47
 _include() at /web/cscms.org/www/core/traits/Index/Router.php:138
 cs\Index->files_router_handler_internal() at /web/cscms.org/www/core/traits/Index/Router.php:124
 cs\Index->files_router_handler() at /web/cscms.org/www/core/traits/Index/Router.php:111
 cs\Index->files_router() at /web/cscms.org/www/core/traits/Index/Router.php:35
 cs\Index->execute_router() at /web/cscms.org/www/core/classes/Index.php:183
 cs\Index->render_content() at /web/cscms.org/www/core/classes/Index.php:144
 cs\Index->render_page() at /web/cscms.org/www/core/classes/Index.php:339
 cs\Index->__finish() at /web/cscms.org/www/core/functions.php:103
 shutdown_function() at /web/cscms.org/www/core/loader.php:36
 require_once() at /web/cscms.org/www/index.php:37

Tried latest Alpha build of Composer as well as git version. There is no such problem with other Bower/NPM packages.

francoispluchino commented 8 years ago

Do you have the problem with the --prefer-dist option?

nazar-pc commented 8 years ago

Yes, it was actually called with --prefer-dist.