PHP Composer behind http proxy

后端 未结 10 2078
日久生厌
日久生厌 2020-11-29 05:45

I use composer on a network where the only way to access the internet is using HTTP or socks proxy. I have http_proxy and https_proxy environment variables. When compose tri

10条回答
  •  失恋的感觉
    2020-11-29 06:19

    You can use the standard HTTP_PROXY environment var. Simply set it to the URL of your proxy. Many operating systems already set this variable for you.

    Just export the variable, then you don't have to type it all the time.

    export HTTP_PROXY="http://johndoeproxy.cu:8080"
    

    Then you can do composer update normally.

提交回复
热议问题