I’m trying to install composer on Windows but I get the following error:
The «https://getcomposer.org/versions» file could not be downloaded:
SSL operation failed with code 1. OpenSSL Error messages: error:
1416F086: SSL routines: tls_process_server_certificate: certificate
verify failed Failed to enable crypto failed to open stream: operation
failed.
What’s going on and how do I fix this?
HPierce
7,0897 gold badges37 silver badges48 bronze badges
asked Jan 27, 2018 at 1:10
3
I have fixed it, the issue you have encountered seems to be related to a missing certificate.
You just need to add your certificate to end of this file:
C:xamppapachebincurl-ca-bundle.crt
Here’s an example how to append the certificate:
——BEGIN CERTIFICATE——
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xvYmFsU2>lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjE… (Your certificate)
——END CERTIFICATE——
iLuvLogix
5,5622 gold badges26 silver badges43 bronze badges
answered Oct 12, 2018 at 6:58
If you are in private network(Restricted Networking) such as Organization, you have to update their certificate in the «curl-ca-bundle.crt», Copy Paste your organization certificate code in the bottom of the «C:xamppapachebincurl-ca-bundle.crt» file.
answered Dec 30, 2020 at 11:59
I had the same issue. You have to find below Certificate and install manually to Trusted root of «Current User/Local Computer».
C:xamppapachebincurl-ca-bundle.crt
answered Feb 21, 2020 at 17:16
As a quick workaround I could run composer
through its docker image:
docker run --rm --interactive --tty
--volume $PWD:/app
composer/composer install
I was bitten by this on my local Ubuntu machine. For no apparent reason, composer would time out.
answered Aug 6, 2021 at 16:25
k0pernikusk0pernikus
56.8k62 gold badges216 silver badges341 bronze badges
Experienced same issue and it was caused by VPN app that was running on my computer, exiting it fixed the issue.
answered Nov 9, 2022 at 7:54
1
I had to exit the VPN for it to work. Posting this for others who may need another alternative if nothing else seems to work.
answered Dec 2, 2022 at 2:28
I have fixed it, the issue you have encountered seems to be related to a missing certificate.
but if don’t have certificate, try this… change composer directory else where but not to desktop and try install again.
it’s real work to me!!
answered Jun 10, 2022 at 16:39
2
-
nickki
- Сообщения: 25
- Зарегистрирован: 2016.08.27, 06:20
не устанавливается Yii 2 на оpen Server
в консоль ввел:
w:domainsyii2.ru>composer create-project yiisoft/yii2-app-basic ./ 2.0.9
выдает:
The «https://packagist.org/packages.json» file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
https://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date Installing yiisoft/yii2-app-basic (2.0.9)
— Installing yiisoft/yii2-app-basic (2.0.9)
Downloading: Failed
Downloading: Failed
Downloading: Failed
Failed to download yiisoft/yii2-app-basic from dist: The «https://api.github.com/repos/yiisoft/yi … f597fe9ab4» file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
— Installing yiisoft/yii2-app-basic (2.0.9)
Cloning 5319c23281f4543da41f7f5ed72837f597fe9ab4
[RuntimeException]
Failed to clone https://github.com/yiisoft/yii2-app-basic.git, git was not found, check that it is installed and in you
r PATH env.
«git» не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
как решить проблему ?
-
rak
- Сообщения: 2181
- Зарегистрирован: 2010.11.02, 23:40
- Контактная информация:
-
nickki
- Сообщения: 25
- Зарегистрирован: 2016.08.27, 06:20
Re: не устанавливается Yii 2 на оpen Server
Сообщение
nickki » 2016.08.27, 18:06
а именно первую We bring the awesome Git SCM to Windows Download Contribute
или в самом низу
Git for Windows SDK : Contributing Code
The Git for Windows SDK is a build environment that includes all the tools necessary for developers who want to contribute by writing code for Git for Windows.
Please look at the technical overview about the Git for Windows packaging and how to include your changes in your own custom installer.
[]Download Git for Windows SDK[]?
-
rak
- Сообщения: 2181
- Зарегистрирован: 2010.11.02, 23:40
- Контактная информация:
Re: не устанавливается Yii 2 на оpen Server
Сообщение
rak » 2016.08.27, 18:20
nickki писал(а):а именно первую We bring the awesome Git SCM to Windows Download Contribute
или в самом низу
Git for Windows SDK : Contributing Code
The Git for Windows SDK is a build environment that includes all the tools necessary for developers who want to contribute by writing code for Git for Windows.
Please look at the technical overview about the Git for Windows packaging and how to include your changes in your own custom installer.[]Download Git for Windows SDK[]?
https://github.com/git-for-windows/git/ … .windows.2
-
nickki
- Сообщения: 25
- Зарегистрирован: 2016.08.27, 06:20
-
nickki
- Сообщения: 25
- Зарегистрирован: 2016.08.27, 06:20
Re: не устанавливается Yii 2 на оpen Server
Сообщение
nickki » 2016.08.27, 21:59
rak писал(а):
nickki писал(а):а именно первую We bring the awesome Git SCM to Windows Download Contribute
или в самом низу
Git for Windows SDK : Contributing Code
The Git for Windows SDK is a build environment that includes all the tools necessary for developers who want to contribute by writing code for Git for Windows.
Please look at the technical overview about the Git for Windows packaging and how to include your changes in your own custom installer.[]Download Git for Windows SDK[]?
https://github.com/git-for-windows/git/ … .windows.2
установил Git под Windows, опен сервер перезагрузил, выдает тоже самое
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
Failed to clone https://github.com/fxpio/composer-asset-plugin.git, git was not found, check that it
is installed and in your PATH env.
«git» не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
-
ElisDN
- Сообщения: 5825
- Зарегистрирован: 2012.10.07, 10:24
-
Контактная информация:
Re: не устанавливается Yii 2 на оpen Server
Сообщение
ElisDN » 2016.08.28, 13:32
rak писал(а):ps. вот я в очередной раз удивляюсь, неужели написать на форум проще, чем вбить 2 слова в гугл?
Это называется «программист-экстраверт»: проще всех окружающих напрячь, чем самому найти.
My error is whenever I try to install Composer using both the GUI and command line I get the same error with SSL verification failing and thus can’t connect to HTTPs through my proxy. I am on a Windows 7 machine running XAMPP behind a proxy.
To start I have done my research on this error and have tried all of the solutions on other posts, and I am wondering what I missed.
- This one seems to be the same problem as me but no answers. https://stackoverflow.com/questions/52457358/ssl-routinestls-process-server-certificatecertificate-verify-failed-failed-to
- This one looks like it might work but I am on a Windows 7 machine and don’t have the option to purge and reinstall my certificates https://stackoverflow.com/questions/53351117/php-composer-https-error-1416f086-certificate-verifying-failed
- This isn’t a virtual machine, it is on the native OS so I don’t think there is any time synchronization that I need to do. https://stackoverflow.com/questions/53154837/ssl-error-messages-error1416f086ssl-routinestls-process-server-certificatec
The things that I have tried:
- Currently using XAMPP for apache, I downloaded and installed latest versions as well as a few previous versions
- I re-downloaded the curl-ca-bundle.crt and updated my xamppapachebincurl-ca-bundle.crt to reflect the latest version (~roughly 20kb difference between the one that came with XAMPP and the one I downloaded).
- I manually downloaded the certificate for getcomposer.org and appended it to the end of my curl-ca-bundle.crt. (Yes I am sure that this is the file that PHP/Composer is using to install)
- When I try to install this through command line I get an error saying no such host is known. I figured out that this issue is due to HTTP/HTTPS_PROXY urls not being set. I turned them on and then I get the same error as through the GUI (found below)
- I then when through Composer’s site and downloaded the .exe to install, in the installer I have the option to specify proxy (which I did) to get rid of the no sush host, after I specified the proxy I now have the exact same error as the command line.
- Disabling the SSL/TLS for composer. But it still fails when trying to contact any website with https.
GUI:
The Composer installer script was not successful [exit code 1].
OpenSSL failed with a ‘certificate verify failed’ error. This
indicates a problem with the Certificate Authority file(s) on your
system, which may be out of date.Certificate location [from openssl.cafile ini setting]:
xamppapachebincurl-ca-bundle.crtThe php.ini used by your command-line PHP is: C:xamppphpphp.ini
Script Output: The «https://getcomposer.org/versions» file could not
be downloaded: SSL operation failed with code 1. OpenSSL Error
messages: error:1416F086:SSL
routines:tls_process_server_certificate:certificate verify failed
failed to open stream: Cannot connect to HTTPS server through proxy
CMD Line:
C:UsersS0077500DesktopLaravelAttempt 7>php composer.phar diagnose
You are running Composer with SSL/TLS protection disabled.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: WARNING
[ComposerDownloaderTransportException] The "https://repo.packagist.org/package
s.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL
Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify fa
iled
failed to open stream: Cannot connect to HTTPS server through proxy
Composer is configured to disable SSL/TLS protection. This will leave remote HTT
PS requests vulnerable to Man-In-The-Middle attacks.
Checking HTTP proxy: FAIL
[ComposerDownloaderTransportException] The "https://repo.packagist.org/package
s.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL
Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify fa
iled
failed to open stream: Cannot connect to HTTPS server through proxy
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: Unable to assess the situation
, maybe github is down (The "https://api.github.com/repos/Seldaek/jsonlint/zipba
ll/1.0.0" file could not be downloaded: SSL operation failed with code 1. OpenSS
L Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify fa
iled
failed to open stream: Cannot connect to HTTPS server through proxy)
Checking github.com rate limit: FAIL
[ComposerDownloaderTransportException] The "https://api.github.com/rate_limit"
file could not be downloaded: SSL operation failed with code 1. OpenSSL Error m
essages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify fa
iled
failed to open stream: Cannot connect to HTTPS server through proxy
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:
[ComposerDownloaderTransportException]
The "https://getcomposer.org/versions" file could not be downloaded: SSL op
eration failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate veri
fy failed
failed to open stream: Cannot connect to HTTPS server through proxy
diagnose
C:UsersS0077500DesktopLaravelAttempt 7>