I'm trying to setup laravel in my Windows system. I've installed composer. But there are some issues with the composer that is creating problems while trying to create a new laravel project.
I did a composer diagnose from the cmd and following are the results:
composer diagnose
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" 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
Laravel Error:
new laravel_demo_1
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 59 installs, 0 updates, 0 removals
- Installing doctrine/inflector (v1.1.0): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download doctrine/inflector from dist: The "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae" 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 doctrine/inflector (v1.1.0): Cloning 90b2128806 from cache
- Installing erusev/parsedown (1.6.1): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download erusev/parsedown from dist: The "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:......
It seems you are simply hitting Github limits due to non authenticated access.
[Composer\Downloader\TransportException] The
"https://api.github.com/rate_limit" file could not be downloaded: SSL
operation failed with code 1. OpenSSL Error messages:
so it should be sufficient to just authenticate yourself:
Log into your GitHub account and click on "Applications" in the sidebar
Create a new token under the "Personal Access Tokens"
in project's folder do:
composer config github-oauth.github.com YOUR-TOKEN
and that should be it.
Related
I'm having this error when I execute composer update in my laravel project (it's been working for years):
- Installing smatar/laravel-settings (1.3): Downloading (failed) Failed to download smatar/laravel-settings from dist: The "https://api.github.com/repos/SMATAR/laravel-settings/zipball/7b76462fe90224688c632d90c5f84a28c0f6e2bc" file could not be downloaded (HTTP/1.1 404 Not Found)
Now trying to download from source
- Installing smatar/laravel-settings (1.3): The authenticity of host 'github.com (18.231.5.6)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Cloning 7b76462fe9
[RuntimeException]
Failed to clone https://github.com/SMATAR/laravel-settings.git via https, ssh protocols, aborting.
- https://github.com/SMATAR/laravel-settings.git
Cloning into '/var/www/html/prod/web/vendor/smatar/laravel-settings'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/SMATAR/laravel-settings.git/'
- git#github.com:SMATAR/laravel-settings.git
Cloning into '/var/www/html/prod/web/vendor/smatar/laravel-settings'...
Warning: Permanently added the RSA host key for IP address '18.228.67.229' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Package deleted from github: https://github.com/SMATAR/laravel-settings
Packagist page for package: https://packagist.org/packages/smatar/laravel-settings
You must contact with package publisher.
I am working on a local server on my windows os,
I used to be able to create new laravel projects normally, but now I keep getting errors like these:
C:\xampp\htdocs>laravel new blog
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 70 installs, 0 updates, 0 removals
- Installing doctrine/inflector (v1.3.0): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download doctrine/inflector from dist: The "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a" 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 doctrine/inflector (v1.3.0): Cloning 5527a48b73 from cache
sure your internet connection not have problem in speed
so check your firewall not blocked api.github.com url
While I want to user Laravel 5 with PHP after installing XAMPP server I downloading composer from its website and while installing composer file in last step it is giving the error:
The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: No connection could be made because the target machine actively refused it."
Hey guys trying to install the slim php api framework locally via composer but everytime I try to run
composer require slim/slim "^3.0"
the following error happens:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" 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
I am doing all of this on my mac running macOS and have no idea how to solve this issue can anyone help me
It's an OpenSSL issue. You can download root certificates with
wget https://curl.haxx.se/ca/cacert.pem
then edit openssl.cafile parameter in your php.ini configuration file:
openssl.cafile=/path/to/cacert.pem
If you aren't able to do it you can use composer's disable-tls option.
composer config -g -- disable-tls true
Enabling this is a security risk and is NOT recommended.
I'm using win7x64.
I can install laravel using composer when I'm not behind proxy, but when I'm behind proxy I cannot install anything using composer.
I tried install laravel/socialite I receive error:
The
"http://packagist.org/p/provider-2013$64cefc090dc586bcea264a3e17529dfa29b16b
2bf50c52626562f13772982949.json" file could not be downloaded: failed
to open st ream: HTTP request failed! http://packagist.org could not
be fully loaded, package information was loaded f rom the local cache
and may be out of date
[Composer\Downloader\TransportException] The
"http://packagist.org/p/laravel/socialite$d9a828b00026fe40a14532c7f93e7
adc78725a74da02a035cd267618876c312a.json" file could not be
downloaded: fai led to open stream: HTTP request failed!
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress]
[--no-update] [--update-no-dev] [--update-with-dependencies]
[--ignore-platform-reqs] [--sort- packages] [packages1] ...
[packagesN]
I have http_proxy and https_proxy env setup.
composer selfupdate is working
but
composer update is not working
Loading composer repositories with package information Updating
dependencies (including require-dev) The
"http://packagist.org/p/provider-2013$64cefc090dc586bcea264a3e17529dfa29b16b
2bf50c52626562f13772982949.json" file could not be downloaded: failed
to open st ream: HTTP request failed! http://packagist.org could not
be fully loaded, package information was loaded f rom the local cache
and may be out of date Nothing to install or update Generating
autoload files Generating optimized class loader
other cli (eg. gem) is working
I have tried
this solution
but it still not working
Here are the composer diag stat:
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json
" file could not be downloaded: failed to open stream: HTTP request failed!
Checking https connectivity to packagist: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: FAIL
Unable to assess the situation, maybe packagist.org is down (The "http://packagi
st.org/packages.json" file could not be downloaded: failed to open stream: HTTP
request failed! )
Checking HTTPS proxy support for request_fulluri: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK
Is there any setup I missed?
I add this to composer.json
"repositories": [
{
"packagist": false
},
{
"type": "composer",
"url": "https://packagist.org/"
}
],
This solution is from:
https://github.com/composer/composer/issues/1992