3

i'm trying to get composer to work on our server but i keep getting issues trying to install/update repositories.

I have configured the environment variables correctly to achieve all this:

http_proxy=http://fastweb.int.bell.ca:8083/
ftp_proxy=ftp://fastweb.int.bell.ca:8083/
HTTP_PROXY_REQUEST_FULLURI=false

I have also forced my composer to use HTTPS protocol only using the configuration directive:

"config": {
    "github-protocols": ["https"]
}

We tried to update the ca_bundle following the post SSL certificate rejected trying to access GitHub over HTTPS behind firewall by setting the GIT_SSL_NO_VERIFY or updating the ca-bundle.crt in /etc/pki/tls/certs...

Nothing seems to work!

Here's the output, it does it for all packages, i tried with and without --prefer-source just to see if it would help, still nothing...

./composer.phar update Loading composer repositories with package
information Updating dependencies (including require-dev)
    - Updating crazycodr/data-transform (dev-master 11f8499 => 2.0.2)
    Checking out 11f8499d0027468705fca72ab67acfbf8ee2e6be

[RuntimeException]   Failed to clone
https://github.com/crazycodr/data-transform.git via git, https and
http protocols, aborting.

- https://github.com/crazycodr/data-transform.git
    fatal: https://github.com/crazycodr/data-transform.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?
Community
  • 1
  • 1
Mathieu Dumoulin
  • 12,126
  • 7
  • 43
  • 71
  • Can you `wget https://github.com/any/github/zipfile-download` with that proxy setup? Can you manually `git clone` repos? I would think there should be a HTTPS_PROXY defined. – Sven Aug 26 '13 at 20:23
  • I'll look into that tomorrow morning, thanks for the suggestion – Mathieu Dumoulin Aug 26 '13 at 22:12

1 Answers1

1

I confirm being able to clone/pull/push a GitHub repo behind a firewall.
And you do need https_proxy in addition of http_proxy:

set http_proxy=http://<login_internet>:<password_internet>@aproxy:aport
set https_proxy=http://<login_internet>:<password_internet>@aproxy:aport
set no_proxy=.company

(the no_proxy part is there to avoid using the proxy for internal url, internal to the company)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • That did it perfectly well – Mathieu Dumoulin Aug 27 '13 at 11:18
  • 1
    Note that the `no_proxy` only works with a very recent copy of composer. The pull request for evaluating that part of the environment variables was merged on 2013-08-11. Earlier versions do not evaluate it, and will happily try to use the proxy for local resources. – Sven Aug 27 '13 at 19:44