I was trying to pull a docker image from a docker registry but hit the following issue:
$ docker pull //
Go to your repository's URL in a browser. You may have to accept all security prompts.
Click (on Chrome) on the padlock on the address bar, then click on "Certificate".
Click and hold down on the paper icon of the certificate and drag to a folder of your preference, or the desktop.
Open your terminal (make sure to replace the last argument with the location of your file):
security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain-db ~/<<>>/<<>>
Restart your docker engine.