probably duplicate but still no answer Getting a “No such remote or remote group” error when trying to use a private repo in Composer
composer doesn't work again -_-
I have removed composer's cache using rm -rf ~/.composer/cache/
but the result didn't change !
the error with the exception trace :
$sudo composer update --prefer-dist -v
[sudo] password for mahdi:
Loading composer repositories with package information
Password for 'https://[email protected]':
Reading composer.json of mysepandar/interfaces (start_repo)
Skipped tag start_repo, invalid tag name
Reading composer.json of mysepandar/interfaces (master)
Importing branch master (dev-master)
Password for 'https://[email protected]':
Reading composer.json of mahdiz/tf-component-1 (master)
Importing branch master (dev-master)
Password for 'https://[email protected]':
Reading composer.json of mahdiz/flat-config (master)
Importing branch master (dev-master)
Password for 'https://[email protected]':
Reading composer.json of mahdiz/easy-two-factor (master)
Importing branch master (dev-master)
Updating dependencies (including require-dev)
Adding VCS repository bower-asset/yii2-pjax
Adding VCS repository bower-asset/punycode
Adding VCS repository bower-asset/jquery
Adding VCS repository bower-asset/typeahead.js
Reading bower.json of bower-asset/jquery (2.1.3)
Importing tag 2.1.3 (2.1.3.0)
Adding VCS repository bower-asset/jquery.inputmask
Reading bower.json of bower-asset/jquery.inputmask (3.1.61)
Importing tag 3.1.61 (3.1.61.0)
Reading bower.json of bower-asset/punycode (v1.3.2)
Importing tag v1.3.2 (1.3.2.0)
Adding VCS repository bower-asset/bootstrap
Reading bower.json of bower-asset/bootstrap (v3.3.2)
Importing tag v3.3.2 (3.3.2.0)
Reading bower.json of bower-asset/typeahead.js (v0.10.5)
Importing tag v0.10.5 (0.10.5.0)
- Updating mysepandar/interfaces dev-master (d9a7453 => 526a6d7)
Checking out 526a6d733f50ec5076cc3cba2c9d1c11cde2c484
[RuntimeException]
Failed to execute git remote set-url composer 'https://[email protected]/mysepandar/interfaces.git' && git fetch composer && git fetch --tags composer
fatal: No such remote 'composer'
Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Util/Git.php:201
Composer\Util\Git->throwException() at phar:///usr/local/bin/composer/src/Composer/Util/Git.php:154
Composer\Util\Git->runCommand() at phar:///usr/local/bin/composer/src/Composer/Downloader/GitDownloader.php:88
Composer\Downloader\GitDownloader->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Downloader/VcsDownloader.php:116
Composer\Downloader\VcsDownloader->update() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:255
Composer\Downloader\DownloadManager->update() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:177
Composer\Installer\LibraryInstaller->updateCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:106
Composer\Installer\LibraryInstaller->update() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:172
Composer\Installer\InstallationManager->update() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:139
Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:578
Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:225
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:140
Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:147
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:84
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
require() at /usr/local/bin/composer:25
and my composer.json is :
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Application Template",
"keywords": [
"yii2",
"framework",
"basic",
"application template"
],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "vcs",
"url": "https://[email protected]/mysepandar/interfaces.git"
},
{
"type": "vcs",
"url": "https://[email protected]/MahdiZ/tfcomponenti.git"
},
{
"type": "vcs",
"url": "https://[email protected]/MahdiZ/flatconfig.git"
},
{
"type": "vcs",
"url": "https://[email protected]/MahdiZ/easytwofactor.git"
}
],
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"mahdi-zareie/yii2-general-base-classes": "dev-master",
"mysepandar/interfaces": "*",
"mahdiz/easy-two-factor": "*",
"mahdiz/tf-component-1": "*",
"mahdiz/flat-config": "*"
},
"require-dev": {
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*"
},
"config": {
"process-timeout": 1800
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::postCreateProject"
]
},
"extra": {
"yii\\composer\\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
],
"generateCookieValidationKey": [
"config/web.php"
]
},
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
Removing the folder of the package that triggers the error from /vendor worked for me. In your case that would mean removing /vendor/mysepandar/.
Then run composer update
again. If that fails update composer using composer self-update
and rinse and repeat.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With