Problem

When running composer install inside this module directory (e.g. if you downloaded it to do contrib work on this module), the installation fails due to using the now deprecated "packagist.drupal-composer.org" repository URL. Example error:

Reading ./composer.json
Loading config file /home/joep/.config/composer/config.json
Loading config file /home/joep/.config/composer/auth.json
Loading config file ./composer.json
Checked CA file /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem: valid
Executing command (/home/joep/src/drupal.org/shariff): git branch --no-color --no-abbrev -v
Reading /home/joep/.config/composer/composer.json
Loading config file /home/joep/.config/composer/config.json
Loading config file /home/joep/.config/composer/auth.json
Loading config file /home/joep/.config/composer/composer.json
Loading config file /home/joep/.config/composer/auth.json
Reading /home/joep/.config/composer/auth.json
Reading /home/joep/.config/composer/vendor/composer/installed.json
Running 1.3.2 (2017-01-27 18:23:41) with PHP 5.6.27 on Linux / 4.8.7-200.fc24.x86_64
Loading composer repositories with package information
Downloading https://packagist.drupal-composer.org/packages.json
Downloading https://packagist.drupal-composer.org/packages.json
Downloading https://packagist.drupal-composer.org/packages.json

  [Composer\Downloader\TransportException] The "https://packagist.drupal-composer.org/packages.json" file could not be downloaded: Peer certificate CN=`*.github.com' did not match expected CN=`packagist.drupal-composer.org'  
  Failed to enable crypto
  failed to open stream: operation failed  

Proposed Resolution

Switch to the new URL for the Drupal composer repository, https://www.drupal.org/drupalorg/blog/drupalorgs-composer-endpoints-are-....

Comments

josephdpurcell created an issue. See original summary.

josephdpurcell’s picture

Issue summary: View changes
josephdpurcell’s picture

Status: Active » Needs review
StatusFileSize
new443 bytes

This patch works successfully for me:

$ composer install --prefer-dist 
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing composer/installers (v1.3.0) Loading from cache
  - Installing heiseonline/shariff (master) Loading from cache
Writing lock file
Generating autoload files

Setting to needs review.

berdir’s picture

I would actually recommend to remove the repositories entry completely.

This is only relevant when using a composer merge plugin, which is deprecated to install contrib and almost everyone is going to have that repository anyway.

berdir’s picture

Status: Needs review » Closed (duplicate)

Actually, #2860441: Remove unnecessary reference to packagist.drupal-composer.org is already doing that, so closing as duplicate of that.