drupal-composer / drupal-scaffold

:construction: Composer Plugin for updating the Drupal scaffold files when using drupal/core

Repository from Github https://github.comdrupal-composer/drupal-scaffoldRepository from Github https://github.comdrupal-composer/drupal-scaffold

Drupal composer create-project Failed to download /plain/ directory

lfricken opened this issue · comments

I'm trying to setup drupal 8 on windows, but it's failing during some download, which I don't understand, since I can navigate to the files myself. Can I download the files myself, or does it need to do additional installation? Either way, I'm not sure where the files would go exactly.

Here is a shortened version of the console:

C:\dev\drupal> composer create-project drupal-composer/drupal-project:8.x-dev

...

Generating autoload files


  [Exception]
  Failed to download https://cgit.drupalcode.org/drupal/plain/update.php, 
https://cgit.drupalcode.org/drupal/plain/sites/example.sites.php, 
https://cgit.drupalcode.org/drupal/plain/.htaccess, 
https://cgit.drupalcode.org/drupal/plain/index.php, 
https://cgit.drupalcode.org/drupal/plain/robots.txt, 
https://cgit.drupalcode.org/drupal/plain/sites/default/default.services.yml, 
https://cgit.drupalcode.org/drupal/plain/sites/example.settings.local.php, 
https://cgit.drupalcode.org/drupal/plain/sites/default/default.settings.php, 
https://cgit.drupalcode.org/drupal/plain/sites/development.services.yml, 
https://cgit.drupalcode.org/drupal/plain/web.config, 
https://cgit.drupalcode.org/drupal/plain/.ht.router.php, 
https://cgit.drupalcode.org/drupal/plain/.gitattributes, 
https://cgit.drupalcode.org/drupal/plain/.csslintrc, 
https://cgit.drupalcode.org/drupal/plain/.editorconfig, 
https://cgit.drupalcode.org/drupal/plain/.eslintignore, 
https://cgit.drupalcode.org/drupal/plain/.eslintrc.json


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

C:\dev\drupal>

Same thing happening to me now, removing global prestissimo solved it.

I write a batch file to fix this problem:

composer-create-project.cmd

@echo off
call composer global remove hirak/prestissimo
call composer -n create-project %*
call composer global require hirak/prestissimo

Still an issue?

Yes, I'm also getting the same errors when running composer create-project drupal-composer/drupal-project:8.x-dev my-project. Indeed removing Prestissimo solves the problem.

FYI I'm running PHP 7.3.2, Composer 1.8.4 and Prestissimo 0.3.8.

I ran into the same issue today. I had hirak/prestissimo (0.3.8) and once I removed it the issue went away.

The problem is that when prestissimo is installed, it uses curl which has CURLOPT_SSL_VERIFYPEER on by default since curl 7.10. I see no easy way to turn verify peer off which would be a bad idea anyway and the 2 sources used by this plugin do not support http, they redirect to https.

A way to fix it is to set curl.cafile=c:\php\cacert.pem in your php.ini to point to a root CA file, e.g. https://curl.haxx.se/ca/cacert.pem downloaded to c:\php. Because you'll probably have this problem with other curl calls.