Skip to content


Failed to clone via git, https protocols, aborting #2176

stefanmerk opened this Issue · 16 comments

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

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

  Failed to clone via git, https protocols, aborting.

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


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

  Failed to clone via g
  it, https protocols, aborting.

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


Exception trace:
 () at phar://C:/Users/u529228/Applications/xampp/htdocs/Lufthansa/composer.phar
 Composer\Downloader\GitDownloader->throwException() at phar://C:/Users/u529228/
 Composer\Downloader\GitDownloader->runCommand() at phar://C:/Users/u529228/Appl
 Composer\Downloader\GitDownloader->doUpdate() at phar://C:/Users/u529228/Applic
 Composer\Downloader\VcsDownloader->update() at phar://C:/Users/u529228/Applicat
 Composer\Downloader\DownloadManager->update() at phar://C:/Users/u529228/Applic
 Composer\Installer\LibraryInstaller->updateCode() at phar://C:/Users/u529228/Ap
 Composer\Installer\LibraryInstaller->update() at phar://C:/Users/u529228/Applic
 Composer\Installer\InstallationManager->update() at phar://C:/Users/u529228/App
 Composer\Installer\InstallationManager->execute() at phar://C:/Users/u529228/Ap
 Composer\Installer->doInstall() at phar://C:/Users/u529228/Applications/xampp/h
 Composer\Installer->run() at phar://C:/Users/u529228/Applications/xampp/htdocs/
 Composer\Command\UpdateCommand->execute() at phar://C:/Users/u529228/Applicatio
 Symfony\Component\Console\Command\Command->run() at phar://C:/Users/u529228/App
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/Users/u52922
 Symfony\Component\Console\Application->doRun() at phar://C:/Users/u529228/Appli
 Composer\Console\Application->doRun() at phar://C:/Users/u529228/Applications/x
 Symfony\Component\Console\Application->run() at phar://C:/Users/u529228/Applica
 Composer\Console\Application->run() at phar://C:/Users/u529228/Applications/xam
 require() at C:\Users\u529228\Applications\xampp\htdocs\Lufthansa\composer.phar

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.

Composer member

It says No such host is known. at:

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

Seems like dns/network issues, I doubt we can help much :/


@Seldaek Thanks for your quick reply.
But I can visit (on the same machine, with the same proxy settings).

And also: Why is https protocols, aborting ?
As I said, I am able to open it in my browser.

Any help is very appreciated.


@stefanmerk, what if you try $ nslookup or $ telnet 9418 from your CLI?

Composer member

aborting is just because all protocols failed so it stops.

In the -vvv output, above the exception you should see the last command it tried to execute, you could try to run that in the shell yourself to see if that works or not.


It is really strange, but i guess it was just a proxy related problem (as you thought in the beginning)
Thanks everybody for your help

@phansys I am not able to run these commands, due to proxy restrictions.
And I guess I was just using a broken proxy.


@stefanmerk stefanmerk closed this

The same problem(fatal: Unable to look up (port 9418) (No such host is known. )) I faced that I can access from browser with proxy in the company domain internet, but I failed to access the github from CLI , even I reset the git proxy or environment variable http_proxy.

BTW, when I set the http_proxy and then try other tools , for example curl and it works. So I think the case is message about git with proxy. Maybe I wrong. But how I can do?


I get the same problem. I get Failed to clone .... via git, https protocols, aborting..

  Failed to clone via git, https protocols,

  - git://
    fatal: unable to connect to Name or service not known

    error: Couldn't resolve host '' while accessing
    fatal: HTTP request failed

I was able to successfully run this command somewhere else, at home, but in the office, I just can't. This seems like a DNS issue.

Composer member

@timothyescopete indeed seems like it's on your end (or your ISP or something), not something we can fix.


@Seldaek How did you get those errors, if you got them? Mine, I just get them via composer install.

Composer member

@timothyescopete I don't get them that's my point, it's probably something on your end.


@stefanmerk , If the problem still remains, you can try to ping from your own machine(any other computer without problems) as

, then received IP you shouldt write to /etc/hosts as
where received_ip == for example. Sorry for my english


My error in Windows was:

Failed to clone via git, https, ssh protocols, aborting.

When I explicitly ran CMD as administrator (although my user had administrator rights) everything went ok.


check your date and time, try reinstall git-scm and try clone witout composer

git clone


I am getting the same issues as above and assume it is caused by proxy/firewall at my work.
My question is: does Composer use a specific port (or anything else unusual) when calling git?


@tedstrauss no. It just calls git normally and lets it do its work


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.