GuzzleHttp\Exception\ConnectException

cURL error 7: Failed to connect to packagist.org port 443 after 9 ms

🐛 How I Ran Into This

The error occurred while using the Packagist REST API with a cron job.

✅ Solution

To resolve the issue, I updated the DNS configuration of the server with following.

8.8.8.8
1.1.1.1

For detailed steps, refer to this article: https://www.redswitches.com/blog/ubuntu-dns-settings/