While creating a ubuntu machine in vagrant recently faced a issue where the image download failed with a SSL error as mentioned below
Error:-
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'krec/ubuntu2004-x64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'krec/ubuntu2004-x64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://vagrantcloud.com/krec/ubuntu2004-x64"]
Error: SSL certificate problem: self signed certificate in certificate chain
Cause:-
If you're encountering a "self signed certificate in certificate chain" error when using Vagrant, it means that the SSL certificate used by the server you're connecting to is not trusted by your system because it is self-signed or not signed by a trusted authority. This can be a security risk, so there can be 2 cases
1. In some cases(testing) it may be acceptable to temporarily disable certificate validation for testing or development purposes.
2. you need to use a self-signed certificate for SSL/TLS connections in a production environment, you can add the certificate to the trusted certificates on your system.
Based on your use case you can implement any of the solution mentioned below