composer / composer/packagist

CURL ERROR : SSL certificate problem: unable to get local issuer certificate

Open
#1,381 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
1.8k
Forks
489
Avg merge
2d 21h
Merged PRs (30d)
32

Description

I am trying to do composer require phpspreadsheet. However it is giving me this error (upon typing composer diagnose -vvv). I have tried doing everything possible. Please help.

C:\xampp\php>composer diagnose -vvv
Running 2.5.8 (2023-06-09 17:13:21) with PHP 8.2.4 on Windows NT / 10.0
Reading ./composer.json (C:\xampp\php\composer.json)
Loading config file ./composer.json (C:\xampp\php\composer.json)
Checked CA file C:\xampp\php\extras\ssl\cacert.pem: valid
Executing command (C:\xampp\php): git branch -a --no-color --no-abbrev -v
Executing command (C:\xampp\php): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (C:\xampp\php): git log --pretty="%H" -n1 HEAD
Executing command (C:\xampp\php): hg branch
Executing command (C:\xampp\php): fossil branch list
Executing command (C:\xampp\php): fossil tag list
Executing command (C:\xampp\php): svn info --xml
Failed to initialize global composer: Composer could not find the config file: C:/Users/vidur.kaushik/AppData/Roaming/Composer/composer.json

Checking composer.json: Reading ./composer.json (C:\xampp\php\composer.json)
WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
require.wisembly/excelant : unbound version constraints (*) should be avoided
Checking platform settings: OK
Checking git settings: Executing command (CWD): git config color.ui
No git process found
Checking http connectivity to packagist: Downloading http://repo.packagist.org/packages.json
[200] http://repo.packagist.org/packages.json
OK
Checking https connectivity to packagist: Downloading https://repo.packagist.org/packages.json
FAIL
[Composer\Downloader\TransportException] curl error 60 while downloading https://repo.packagist.org/packages.json: SSL certificate problem: unable to get local issuer certificate
Checking github.com rate limit: Downloading https://api.github.com/rate_limit
FAIL
[Composer\Downloader\TransportException] curl error 60 while downloading https://api.github.com/rate_limit: SSL certificate problem: unable to get local issuer certificate
Checking disk free space: OK
Checking pubkeys: FAIL
Missing pubkey for tags verification
Missing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: Downloading https://getcomposer.org/versions
FAIL
[Composer\Downloader\TransportException] curl error 60 while downloading https://getcomposer.org/versions: SSL certificate problem: unable to get local issuer certificate
Composer version: 2.5.8
PHP version: 8.2.4
PHP binary path: C:\xampp\php\php.exe
OpenSSL version: OpenSSL 3.0.8 7 Feb 2023
cURL version: 7.85.0 libz 1.2.12 ssl OpenSSL/3.0.8
zip: extension not loaded, unzip not available, 7-Zip present (7z)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `composer diagnose -vvv` with PHP 8.2.4 on Windows and review the reported `C:\xampp\php\extras\ssl\cacert.pem` configuration. Compare the failing HTTPS checks for Packagist, GitHub, and getcomposer.org with the successful HTTP check. Done means the HTTPS connectivity checks complete without the reported cURL error 60.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.