致命的:没有这样的远程作曲家'

时间:2015-03-16 08:01:20

标签: composer-php yii2

可能重复但仍无回答Getting a “No such remote or remote group” error when trying to use a private repo in Composer

作曲家不再工作-_-

我已使用rm -rf ~/.composer/cache/删除了作曲家的缓存,但结果并没有改变!

异常跟踪的错误:

$sudo composer update --prefer-dist -v
[sudo] password for mahdi:                                                                                      
Loading composer repositories with package information                                                          
Password for 'https://MahdiZ@bitbucket.org':                                                                              
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://MahdiZ@bitbucket.org':                                                                                                         
Reading composer.json of mahdiz/tf-component-1 (master)                                                                                              
Importing branch master (dev-master)                                                                                                                 
Password for 'https://MahdiZ@bitbucket.org':                                                                                                         
Reading composer.json of mahdiz/flat-config (master)                                                                                                                    
Importing branch master (dev-master)                                                                                                                                    
Password for 'https://MahdiZ@bitbucket.org':                                                                                                                            
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://MahdiZ@bitbucket.org/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

我的composer.json是:

{
  "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://MahdiZ@bitbucket.org/mysepandar/interfaces.git"
    },
    {
      "type": "vcs",
      "url": "https://MahdiZ@bitbucket.org/MahdiZ/tfcomponenti.git"
    },
    {
      "type": "vcs",
      "url": "https://MahdiZ@bitbucket.org/MahdiZ/flatconfig.git"
    },
    {
      "type": "vcs",
      "url": "https://MahdiZ@bitbucket.org/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"
    }
  }
}

1 个答案:

答案 0 :(得分:7)

从/供应商处删除触发错误的包的文件夹。在你的情况下,这将意味着删除/ vendor / mysepandar /.

然后再次运行composer update。如果失败,请使用composer self-update更新作曲家并冲洗并重复。