curl SSL certificate

  certificate, curl, docker, ubuntu

I have problem with downloading docker on ubuntu server.

if I put :

curl -fsSL | sudo apt-key add -

I get :

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here:

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

I google it and I try several thinks like:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

sudo apt-get install ca-certificates

but nothing helps,…

if I do

cd /etc/ssl/certs/; wget; shasum -c cacert.pem.sha256; rm -f cacert.pem.sha256

I get :

--2019-06-03 12:19:31--
Resolving (,,, ...
Connecting to (||:443... connected.
ERROR: cannot verify's certificate, issued by ‘,...OU=..,L=..ST=,..NC=..,O=..C=..’:
  Unable to locally verify the issuer's authority.
To connect to insecurely, use `--no-check-certificate'.

How do I solve this, and how do I found the certificate that was signed by our email,…

Source: StackOverflow