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
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'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.
I am getting a TransportException when I run composer update on Ubuntu using a fresh install of Laravel Forge.
forge#trust-dale-production-V2:~/default$ composer update
> php artisan clear-compiled
Loading composer repositories with package information
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/amcardwell/trust-dale" file could not be downloaded (HTTP/1.1 404 Not Found)
I am able to run a composer install... and I can use git connect to my git repo and push/pull. Here is an output of composer diag:
forge#trust-dale-production-V2:~/default$ composer diag
Checking composer.json: WARNING
require.yangqi/htmldom : unbound version constraints (dev-master) should be avoided
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: OK
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: OK
Why am I getting this error?
I figured it out. I didnt have a github oauth token linked yet. Thanks :)
If I run "composer diagnose" it gaves me a FAIL message when checking github.com rate limit:
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: Connection reset by peer
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
I'm NOT behind a proxy or firewall and I CAN download everything from HTTP or HTTPS. I've tried to change my cacert.pem and everything more. But nothing can fix it.
When I try to install a package an error occurs too:
sudo composer require cocur/slugify
Using version ^2.0 for cocur/slugify
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing cocur/slugify (v2.0)
Downloading: 100%
Downloading: 100%
Downloading: 100%
Failed to download cocur/slugify from dist: The "https://api.github.com/repos/cocur/slugify/zipball/912bf41f940f9a4e38ff1284b1841eaa71911d7f" file could not be downloaded: SSL: Connection reset by peer
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
- Installing cocur/slugify (v2.0)
Cloning 912bf41f940f9a4e38ff1284b1841eaa71911d7f
The authenticity of host 'github.com (192.30.252.130)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
Failed to clone https://github.com/cocur/slugify.git via https, ssh protocols, aborting.
- https://github.com/cocur/slugify.git
Cloning into '/home/user/temp/vendor/cocur/slugify'...
fatal: unable to access 'https://github.com/cocur/slugify.git/': gnutls_handshake() failed: A TLS packet with unexpected length was received.
- git#github.com:cocur/slugify.git
Cloning into '/home/user/temp/vendor/cocur/slugify'...
Warning: Permanently added 'github.com,192.30.252.130' (RSA) 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.
require [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
I am getting an issue of 400 bad request connecting over http, and it seems the package only wants to be installed via http. I tried an override in composer.json as tried by others as workaround to force https - but that doesn't seem to work. I'm not behind a firewall. Mac OS 10.10.3
Issue :
composer diagnose
Checking composer.json: FAIL
the property name is required
the property description is required
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
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 (HTTP/1.1 400 Bad Request)
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK
[Composer\Downloader\TransportException]
The "http://packagist.org/p/provider-2013$c2596c5d04e7701561420666ba120ede9429a69c75b732a5a01b18ebb3d64e53.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Composer.json
{
"repositories": [
{ "packagist": false }
,
{
"type": "composer",
"url": "https://packagist.org"
}
]
}
Composer version 1.0-dev (92faf1c7a83a73794fb914a990be435e1df373ca)
2015-07-14 12:37:15
For me quitting Forticlient (antivirus/web security app) removed the 400 bad request error and allowed me to download laravel via composer.
Maybe you have antivirus software or similar that is interfering.
I'm on Mac OS X 10.11
I have same problem and I use composer diagnose -vvv
Checking git settings: Executing command (CWD): git config color.ui
OK
Checking http connectivity to packagist: Downloading http://packagist.org/packages.json
FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Because I install Forticlient, stop it and everything work fine.
I am installing Yii2 on my Mac OS X El Capitan 10.11.06 and resolved as follows.
In my case I had to close an application (antivirus/web security app)
FortiClient Aplication Close
Then try again to make the composer command
composer global require "fxp/composer-asset-plugin:^1.2.0"