-1

My company's IPs range seems to be blocked by packagist.org's hosting service and I can't reach that domain. I've already contacted them but I don't know how much long it will take to remove the blockage. Moreover, every external web proxy I try to use falls into my company's firewall so I'm stuck.

Is there any public mirror for composer packages so I don't have to depend on packagist.org domain?

Any other solution is welcome as well.

Phellipe Ribeiro
  • 491
  • 3
  • 13

2 Answers2

1

I couldn't find a public mirror but I was able to solve packagist.org dependency by editing ~/.composer/config.json and adding dependent projects' GitHub links as repositories, eg:

{
    "repositories": [
        { "type": "vcs", "url": "https://github.com/smarty-php/smarty" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/phpunit" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/php-code-coverage" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/php-file-iterator" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/php-text-template" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/php-timer" },
        { "type": "vcs", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects" },
        { "type": "vcs", "url": "https://github.com/phpspec/prophecy" },
        ...
        { "packagist": false }
    ]
}

The drawback is pretty obvious: I had to map every dependency and dependency's dependencies and point out theirs GitHub link. At least it's been faster to do this than to wait for OVH hosting service to solve the blockage problem.

Phellipe Ribeiro
  • 491
  • 3
  • 13
0

The team responsible for packagist.org states that they don't block anyone within their server. They cannot vouch for the hosting company though.

There is no mirror server that I know of. Are you positively sure that this isn't an issue with your firewall? If you say that you cannot use public proxies because of it, I would say that it might block too much.

On the other side, relying on certain external servers to be up when you need them probably is an expectation that cannot be met all the time. This isn't just packagist.org, but all other hosting web servers with the software you want, like Github, Bitbucket etc. I'd say this would be an ideal opportunity to start creating a local copy for you, but of course this would need a working first time contact with packagist.org.

Sven
  • 69,403
  • 10
  • 107
  • 109
  • Thank you for your answer @Sven. I've tracerouted from my machine to packagist.org and the connection ends on an OVH server so it's not my firewall blockage responsible for this problem. I'm already trying to contact OVH for solving this but indeed this is a great opportunity for my company to start building mirrors on more or less critical packaging services. – Phellipe Ribeiro Jun 10 '15 at 16:27