您好,匿名用户
随意问技术百科期待您的加入

使用composer时候报错了,提示没有此远程composer

0 投票
[rivsen@rivsen-dell-pc symfony]$ composer update -v
Loading composer repositories with package information
Updating dependencies
  - Updating kriswallsmith/assetic dev-master (deed96b => 8ca1861)
    Checking out 8ca1861fbed58e2c6ffcca5c0a1726c40a10a77c


                                                                                                            
  [RuntimeException]                                                                                        
  Failed to clone http://github.com/kriswallsmith/assetic.git via git, https and http protocols, aborting.  
                                                                                                            
  - git://github.com/kriswallsmith/assetic.git                                                              
    fatal: 没有此远程 'composer'                                                                                 
                                                                                                            
  - https://github.com/kriswallsmith/assetic.git                                                            
    fatal: 没有此远程 'composer'                                                                                 
                                                                                                            
  - http://github.com/kriswallsmith/assetic.git                                                             
    fatal: 没有此远程 'composer'                                                                                 
                                                                                                            
                                                                                                            


Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Downloader/GitDownloader.php:341
 Composer\Downloader\GitDownloader->throwException() at phar:///usr/local/bin/composer/src/Composer/Downloader/GitDownloader.php:291
 Composer\Downloader\GitDownloader->runCommand() at phar:///usr/local/bin/composer/src/Composer/Downloader/GitDownloader.php:67
 Composer\Downloader\GitDownloader->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Downloader/VcsDownloader.php:91
 Composer\Downloader\VcsDownloader->update() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:212
 Composer\Downloader\DownloadManager->update() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:158
 Composer\Installer\LibraryInstaller->updateCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:105
 Composer\Installer\LibraryInstaller->update() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:171
 Composer\Installer\InstallationManager->update() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:138
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:460
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:187
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:82
 Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:238
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:193
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:101
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:106
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:74
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:37
 require() at /usr/local/bin/composer:15

但是我手动调用 git clone那几个地址都是可以clone的

用户头像 提问 2013年 10月10日 @ Darius 上等兵 (331 威望)
分享到:

1个回答

0 投票
 
最佳答案

经过翻看composer在github的issues,查到一个解决办法,因为我是从symfony官网下载的带vendor的2.1.4版本,然后解压之后就执行了 composer update 但是遇到了这个错误,github上回复说:

justin-amt commented 4 months ago

I have exactly same problem on php composer.phar update

[RuntimeException]
Failed to clone http://github.com/fabpot/Twig.git via git, https and http protocols, aborting.

- git://github.com/fabpot/Twig.git
fatal: No such remote 'composer'

- https://github.com/fabpot/Twig.git
fatal: No such remote 'composer'

- http://github.com/fabpot/Twig.git
fatal: No such remote 'composer'

How to correct it?

Seldaek commented 4 months ago
@justinamt that looks like you have an outdated vendor dir (from a very old composer.phar) just delete the vendor/* and run install or update again to get them up to date.

from https://github.com/composer/composer/...

于是我mv了vendor文件夹,然后执行 composer install 发现可以正常下载了。

用户头像 回复 2013年 10月10日 @ 阿尔托莉雅 下士 (587 威望)
选中 2013年 9月7日 @Darius
提一个问题:

相关问题

0 投票
1 回复 73 阅读
0 投票
0 回复 38 阅读
0 投票
1 回复 58 阅读
+2 投票
1 回复 64 阅读

欢迎来到随意问技术百科, 这是一个面向专业开发者的IT问答网站,提供途径助开发者查找IT技术方案,解决程序bug和网站运维难题等。
温馨提示:本网站禁止用户发布与IT技术无关的、粗浅的、毫无意义的或者违法国家法规的等不合理内容,谢谢支持。

欢迎访问随意问技术百科,为了给您提供更好的服务,请及时反馈您的意见。
...