Skip to content

Instantly share code, notes, and snippets.

@ozh
Created March 24, 2014 23:30
Show Gist options
  • Save ozh/9751639 to your computer and use it in GitHub Desktop.
Save ozh/9751639 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
@wagnermarques
Copy link

Ok, no problem... thanks...

@leandroximenes
Copy link

Thank you!!

I replace this :
php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \

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

in laravel sail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment