Skip to content

Instantly share code, notes, and snippets.

@libern
Forked from ozh/composer-proxy.md
Created August 1, 2019 08:05
Show Gist options
  • Save libern/756fabaf5f0cbd859a4ff86b4ce6bb6c to your computer and use it in GitHub Desktop.
Save libern/756fabaf5f0cbd859a4ff86b4ce6bb6c to your computer and use it in GitHub Desktop.
Using Composer behind a proxy

Define the proxy in the CLI :

$ export https_proxy='87.248.188.202:8080'
$ export http_proxy='87.248.188.202:8080'

Check proxy :

$ curl https://icanhazip.com
87.248.188.202

$ curl http://icanhazip.com
87.248.188.202

Install composer :

$ curl -sS https://getcomposer.org/installer | php

(alternative: just download https://getcomposer.org/composer.phar, duh)

Check composer :

$ php composer.phar diagnose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment