composer: Failed to clone via git, https protocols, aborting

Hey there,

it’s me again with a new issue.

I am trying to update (install) a package with composer. But if I do this I receive the following ERROR message My command: php composer.phar update friendsofsymfony/user-bundle Output:

Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Updating friendsofsymfony/user-bundle dev-master (f821491 => 96c5833)
    Checking out 96c58334211aab5f57376f0f4f817a7fda853c4f



  [RuntimeException]
  Failed to clone https://github.com/FriendsOfSymfony/FOSUserBundle.git via git, https protocols, aborting.

  - git://github.com/FriendsOfSymfony/FOSUserBundle.git
    fatal: Unable to look up github.com (port 9418) (No such host is known. )

  - https://github.com/FriendsOfSymfony/FOSUserBundle.git




update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
 [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]

And composer diagnose output:

Checking platform settings: OK
Checking http connectivity: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: OK
Checking composer.json: OK
Checking disk free space: OK
Checking composer version: OK

And also a run with -vvv


  [RuntimeException]
  Failed to clone https://github.com/FriendsOfSymfony/FOSUserBundle.git via g
  it, https protocols, aborting.

  - git://github.com/FriendsOfSymfony/FOSUserBundle.git
    fatal: Unable to look up github.com (port 9418) (No such host is known. )

  - https://github.com/FriendsOfSymfony/FOSUserBundle.git




Exception trace:
 () at phar://C:/Users/u529228/Applications/xampp/htdocs/Lufthansa/composer.phar
/src/Composer/Downloader/GitDownloader.php:377
 Composer\Downloader\GitDownloader->throwException() at phar://C:/Users/u529228/
Applications/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Downloader/GitDow
nloader.php:314
 Composer\Downloader\GitDownloader->runCommand() at phar://C:/Users/u529228/Appl
ications/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Downloader/GitDownloa
der.php:74
 Composer\Downloader\GitDownloader->doUpdate() at phar://C:/Users/u529228/Applic
ations/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Downloader/VcsDownloade
r.php:91
 Composer\Downloader\VcsDownloader->update() at phar://C:/Users/u529228/Applicat
ions/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Downloader/DownloadManage
r.php:215
 Composer\Downloader\DownloadManager->update() at phar://C:/Users/u529228/Applic
ations/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Installer/LibraryInstal
ler.php:161
 Composer\Installer\LibraryInstaller->updateCode() at phar://C:/Users/u529228/Ap
plications/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Installer/LibraryIn
staller.php:105
 Composer\Installer\LibraryInstaller->update() at phar://C:/Users/u529228/Applic
ations/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Installer/InstallationM
anager.php:171
 Composer\Installer\InstallationManager->update() at phar://C:/Users/u529228/App
lications/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Installer/Installati
onManager.php:138
 Composer\Installer\InstallationManager->execute() at phar://C:/Users/u529228/Ap
plications/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Installer.php:509
 Composer\Installer->doInstall() at phar://C:/Users/u529228/Applications/xampp/h
tdocs/Lufthansa/composer.phar/src/Composer/Installer.php:210
 Composer\Installer->run() at phar://C:/Users/u529228/Applications/xampp/htdocs/
Lufthansa/composer.phar/src/Composer/Command/UpdateCommand.php:103
 Composer\Command\UpdateCommand->execute() at phar://C:/Users/u529228/Applicatio
ns/xampp/htdocs/Lufthansa/composer.phar/vendor/symfony/console/Symfony/Component
/Console/Command/Command.php:244
 Symfony\Component\Console\Command\Command->run() at phar://C:/Users/u529228/App
lications/xampp/htdocs/Lufthansa/composer.phar/vendor/symfony/console/Symfony/Co
mponent/Console/Application.php:897
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/Users/u52922
8/Applications/xampp/htdocs/Lufthansa/composer.phar/vendor/symfony/console/Symfo
ny/Component/Console/Application.php:191
 Symfony\Component\Console\Application->doRun() at phar://C:/Users/u529228/Appli
cations/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Console/Application.ph
p:117
 Composer\Console\Application->doRun() at phar://C:/Users/u529228/Applications/x
ampp/htdocs/Lufthansa/composer.phar/vendor/symfony/console/Symfony/Component/Con
sole/Application.php:121
 Symfony\Component\Console\Application->run() at phar://C:/Users/u529228/Applica
tions/xampp/htdocs/Lufthansa/composer.phar/src/Composer/Console/Application.php:
83
 Composer\Console\Application->run() at phar://C:/Users/u529228/Applications/xam
pp/htdocs/Lufthansa/composer.phar/bin/composer:43
 require() at C:\Users\u529228\Applications\xampp\htdocs\Lufthansa\composer.phar
:15


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
 [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]

The --prefer-source option does not help here.

Also I am able to call all the websites in my browser with the same proxy settings.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Reactions: 1
  • Comments: 27 (6 by maintainers)

Most upvoted comments

I had the same issues. I just ran “composer clear-cache” to clear the cache after which I ran “composer install” on my project directory folder. that solved it

solved by composer self-update

Mostly a firewall issue enable incoming&outgoing traffic for port 9418 on your environment and try.Port 9418 is used by github