How to fix "https://repo.packagist.org/packages.json does not contain valid Json"?

How to fix "https://repo.packagist.org/packages.json does not contain valid Json"?

how to fix anything
how to fix broken things
how to fix phone
how to fix things around the house
how to fix stuff
how to fix a zipper
how to fix keyboard
ifix and repair

I've an issue with composer running on a vagrantbox (Centos 7), which started to just suddenly happen.

I've already tried manually running the command/solution mentioned on the link below but to no avail.

(To clarify, i'm using vagrant not docker, but it was the closest question i found to my situation. Most of the information i found are related to composer.json not being valid, but here is packagist.org/packages.json which, is currently valid)

Composer not working in docker container: "https://packagist.org/packages.json" does not contain valid JSON

Here are the details of the issue.

While running composer update on terminal i get:

 composer update


  [Seld\JsonLint\ParsingException]
  "https://repo.packagist.org/packages.json" does not contain valid JSON
  Parse error on line 1:

  ^
  Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

And when running composer install also on terminal every package returns this:

Failed to download psr/cache from dist: "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8" 
appears broken, and returned an empty 200 response
    Now trying to download from source

When running composer config --global repo.packagist composer packagist.org the results are now

composer update
Loading composer repositories with package information


  [Composer\Downloader\TransportException]
  Your configuration does not allow connections to http://repo.packagist.org/packages.json. See https://getcomposer.o
  rg/doc/06-config.md#secure-http for details.

Any ideas why this started to happen, how can i fix it?


same problem here, since php updated to 7.2.17. On a centos 7 with php 7.2.16 composer run just fine... Rollback to 7.2.16 is for now the only solution found...

Edit : Seems to be a symfony flex issue : https://github.com/symfony/flex/issues/484

How To Repair Almost Everything, Timestamps 00:01 Slime cleaning trick 02:29 Coca-cola rust removal 02:55 Wall repair trick 03 Duration: 13:56 Posted: Apr 21, 2020 Thousands of repair manuals, tutorials, and how-to guides for DIY fixes. From electronics to cars, learn how to repair your own stuff and save yourself some money.


Could also be IPv6 related, if your provider/system is configured for IPv6 but has no valid IPv6 route out to the internet.

This happened to me, and doing sysctl -w net.ipv6.conf.all.disable_ipv6=1 (as root), then trying composer again fixed the issue.

To permanently apply it, add the rule to /etc/sysctl.conf (or wherever your OS preferred is)

iFixit: The Free Repair Manual, iFixit is a global community of people helping each other repair things. Let's fix the world, one device at a time. Troubleshoot with experts in the Answers� People Helping People Fix Stuff. Help is here! Learn how to do your own repairs and save money! This site is filled with articles written by skilled individuals. You will find step by step "How To", tips and tricks, and general guidance on fixing your stuff. Finding Solutions


it will works when we run this command in console

composer config disable-tls true

Repair Manuals for Every Thing, Thousands of repair manuals, tutorials, and how-to guides for DIY fixes. From electronics to cars, learn how to repair your own stuff and save yourself some� iFixit is a global community of people helping each other repair things. Let's fix the world, one device at a time. Troubleshoot with experts in the Answers forum—and build your own how-to guides to share with the world.


I bypassed the problem by redirecting the output to /dev/null.

composer require symfony/orm-pack > /dev/null

40 Most Creative Examples Of How To Fix Broken Stuff, Dropped that ancient vase your great grandfather shipped from the Middle East in the 19th century? Happens. But it might not be trash just yet, as these creative � Easy Fix solutions have been discontinued. Instead, you can upgrade to Windows 10 and get troubleshooters that are built right in. To get Windows 10, see Windows 10 Home. Need more info on Windows 10? See Upgrade to Windows 10: FAQ. Windows 10. Windows 10 uses troubleshooters to help you solve problems with your PC. To run a troubleshooter:


How to Fix (Just About) Everything: More Than 550 Step-by-Step , How to Fix (Just About) Everything: More Than 550 Step-by-Step Instructions for Everything from Fixing a Faucet to Removing Mystery Stains to Curing a� Here's how: 1. Navigate to the Windows 10 Advanced Startup Options menu. On many laptops, hitting F11 as soon as you power on will 2. Click Startup Repair.


How To Fix A Broken Appliance, Tackling an appliance repair by yourself can be an intimidating ordeal, but we are here you make your do-it-yourself repair experience as easy as possible. Select� How to Fix the Most Annoying Things in Windows 10. Windows 10 is great, but it has its issues, from unpredictable reboots to Cortana. Here's how to fix some of the more irritating quirks with


100 Home Repairs You Can Do Yourself — The Family Handyman, How to Fix Roof Vents. Check for cracked housings on plastic roof vents and broken seams on metal ones. You might be tempted to throw caulk� Here are 6 steps to fix it yourself. Don't get frustrated and give up on a slow PC, take a few minutes to troubleshoot and remedy it. Jason Cipriani. May 7, 2020 3:00 a.m. PT.