packagist.drupal-composer.org file could not be downloaded
I'm excited to be starting a new Drupal 8 project. I get to try new and shiny things. Only this time I'm breaking things along the way as I figure out what some of our new processes will be with Drupal 8.
Part of what I've been looking into is how to go about providing local environments to team members, building out the code-base, etc. With Drupal 7 I was pretty comfortable using .make files, install profiles and distributions. I wanted to give Drupal Composer a try. There are several other articles that discuss Drupal Composer and more specifically Drupal Project (Composer template for Drupal projects). I'll leave it up to you to read through those other articles.
I wanted to keep this short and sweet and point out an issue I ran into and what the work-around is in case anyone else runs into similar issues.
While running "composer install" I started to get the following error.
[Composer\Downloader\TransportException]
The "https://packagist.drupal-composer.org/p/provider-archived%241a0102814c28..." file could not be downloaded (HTTP/1.1 404 Not Found)
A good couple of hours was spent trying to track down what I may have done to break the process. I went to https://packagist.drupal-composer.org and at first inspection the site looked up. Then I started browsing for packages and noticed that when trying to view a package the server was returning a 500 error. This was the likely culprit of the 404 issue I was receiving.
Now that I know it's most likely not an issue with my composer.json file, my next task was figuring out how to work-around packagist.drupal-composer.org being essentially offline. I needed to get some work done.
On the off chance that packagist.drupal-composer.org was just another domain for packagist.org, I modified my composer.json file changing:
"url": "https://packagist.drupal-composer.org"
to:
"url": "https://packagist.org"
Bingo!!!
While I can't use "sudo composer create-project drupal-composer/drupal-project:~8.0 drupal --stability dev --no-interaction" mentioned in the articles linked to above, I was able to simply download the project template and then run "composer install". All of the packages downloaded without issue and things are starting to get back on track.
Hopefully this is just a random server down issue but in case anyone else runs into the same issue, maybe this will be helpful.