Closed 31er closed 8 years ago
This happens with the recent composer.phar
update. composer does not allow unsecure connections by default anymore:
secure-http#
Defaults to true. If set to true only HTTPS URLs are allowed to be downloaded via Composer. If you really absolutely need HTTP access to something then you can disable it, but using Let's Encrypt to get a free SSL certificate is generally a better alternative.
https://getcomposer.org/doc/06-config.md#secure-http
However, even if you have both versions (http
and https
) of the contao legacy package repository in the repositories
section of your composer.json
, composer will still complain. The only solution right now is to remove
{
"type": "composer",
"url": "http://legacy-packages-via.contao-community-alliance.org/"
}
(or add "secure-http": false
to the config
section, which is not recommended of course)
In fact there is no real reason IMO to still retain the http
url in composer.json.
Most servers have https
support now a days and therefore it is obsolete.
We can safely delete it. However, this will only affect new installations then.
Hab gerade bei einer Installation auf Composer gewechselt. Dabei noch zwei legacy Pakete belassen (efg und xls_export). Auch wenn ich die Zeilen aus der composer.json entfernt habe (ja, auch cache von Composer geleert) bin ich nicht weiter gekommen. Notlösung: legacy-Erweiterungen aus composer.json entfernen, dann update machen und Erweiterungen per Hand wieder hochladen. Dann Erweiterungen wieder in die composer.json eintragen, damit mir die nicht beim nächsten mal entfernt werden ^^ Scheint irgendwo noch der Wurm drinn zu sein oder?
Viele Grüße
Du hast in der composer.json den Bereich mit http:// entfernt?
Ja, sowas von. Der war so weg, das ich den gar nicht mehr gesehen habe ;-) Vorher hab ich den mal bearbeitet gehabt und https draus gemacht. Beides hat nicht geholfen :(
Hm, have you tried deleting everything under /composer/cache/repo
as well?
Jep, everything in /composer/cache
I had the same problem but I just take out
{ "type": "composer", "url": "http://legacy-packages-via.contao-community-alliance.org/" }
and everything works fine!
Also the same problem.
Expertenmodus > s added > save > Composer Cache leeren > nun geht's.
P.S. Freitag Nachmittag war das Problem beim Kunden plötzlich da.
@christianbarkowsky Du musst es aber nicht hinzufügen, sondern eher den http Eintrag löschen, oder?!
@frontendschlampe bei mir ging es aber so!
ja ... natürlich ging es, aber der Eintrag für https steht doch bereits drin!
@frontendschlampe stimmt ... nun ist es doppelt! :-s
:-D ... sag ich doch!
Legacy Pakete werden aber scheinbar immernoch über die HTTP-Verbindung geladen:
- Installing contao-legacy/newslanguage (2.1.0.9035) Downloading http://legacy-packages-via.contao-community-alliance.org/er2-proxy/newslanguage/20010009/35
trotz HTTPS in der composer.json
:
{ "type": "composer", "url": "https://legacy-packages-via.contao-community-alliance.org/" }
Lösche mal Cache, lock und installed file.
Habe ich versucht, alles bis auf das composer.json
file gelöscht - ohne legacy pakete gehts.
I have set up an empty directory with the accordingly composer.json
file and it still fails:
- Installing contao-legacy/newslanguage (2.1.0.9035)
Downloading http://legacy-packages-via.contao-community-alliance.org/er2-proxy/newslanguage/20010009/35
Downloading: Connecting... Download failed, retrying...
Downloading http://legacy-packages-via.contao-community-alliance.org/er2-proxy/newslanguage/20010009/35
Downloading: Connecting... Download failed, retrying...
Downloading http://legacy-packages-via.contao-community-alliance.org/er2-proxy/newslanguage/20010009/35
Downloading: Connecting...
Failed: [Composer\Downloader\TransportException] 0: Your configuration does not allow connection to http://legacy-packages-via.contao-community-alliance.org. See https://getcomposer.org/doc/06-config.md#secure-http for details.
[Composer\Downloader\TransportException]
Your configuration does not allow connection to http://legacy-packages-via.contao-community-alliance.org. See https://getcomposer.org/doc/06-config.md#secure-http for details.
Could it be, that the contao-legacy packagist server actually points to the er2-proxy repositories without SSL, regardless of whether you use https://legacy-packages-via.contao-community-alliance.org or http://legacy-packages-via.contao-community-alliance.org ?
It seems to be like this...
Yep, that's the case. Sadly the complete re-import of all extensions is still running.
When it is done, all URLs will be https:// based
thanks! :+1:
All parsed, new URLs should be distributed as caches slowly clear up. Any update on your side?
Works for me!
After cleaning up the composer.json the composer stuff is working. So for me its working too, but I haven
t installed any extensions, just searched and detail views.
Läuft
Fixed in trunk with c247028160499cc9c3eadaf0f5fe5aeaa897fd56.
Since this will affect everyone that tries to make a fresh composer client installation (via the ER2 for example), 0.16.4
should be released as soon as possible.
Granted, I just wanted to wait for input on all other issues. Mainly on the endless loop of "restart the operation". However I suspect it was due to the regression introduced in composer 1.0.1 and fixed in 1.0.2. Will release within the next days.
just a note: we still need the http version for testing out satis in our local computer
Can you clearify this? Why do you want to connect via plain http instead of https? I thought satis knows HTTPs.
When you use satis server on your local computer (not hosted in a domain) and a self-signed certificate it wouldn't work even if you add the option verify peer false e.g. https://localhost:8181,
but luckily adding '"secure-http":false' under options key inside composer.json will work but not recommended according to composers documentation
You can run the command and get fix:
composer config -g secure-http false
@flik this is not recommended
Simply add this configuration to your composer.json file.
"config": { "secure-http": false } Here is an full example of a working composer.json file
"repositories": [{ "type": "composer", "url": "http://packagist.org" }], "require": { "phpmailer/phpmailer": "^6.0" }, "config": { "secure-http": false } }
@leonfrombeawwwer you should not do this.
@fritzmg Thanks for the feedback. Would you explain why? Thanks, Leon
The real solution for any SSL problem is never to not use SSL, as this is a potential security risk. You should solve the SSL problem in the first place.
See all the comments above.
I see, I was looking for ways to solve it but needed to move on with the project. As a quick fix it worked great for me. I can always remove the config and all will be secure again here, or not?
Contao 3.5.6 Composer-Client 0.16.3
Bei "Testlauf" oder "Pakete aktualisieren" erscheint im Textoutput:
Your configuration does not allow connection to http://legacy-packages-via.contao-community-alliance.org. See https://getcomposer.org/doc/06-config.md#secure-http for details. http://legacy-packages-via.contao-community-alliance.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Der Hinweis verschwindet erst, wenn man in der composer.json http auf https ändert. Siehe auch: https://community.contao.org/de/showthread.php?61453-Your-configuration-does-not-allow-connection-to-http