Score:0

how to ignore x509 certificate on Mac terminal

gb flag

I am on my local terminal in Mac, and I am trying to login to this harbor repo - https://:50003 I have added server ip to /etc/hosts file. I have added this server entry as insecure registry in daemon.json file

Now when I do docker login , this error comes up

`

docker login servername:50003
 Username: developer

 Password:
 
Error response from daemon: Get "https://server01:50003/v2/": x509: certificate relies on legacy Common Name field, use SANs instead`
Login to repo on WEBUI works though after ignoring cert error

Now I know that there are 2 options here

ignore this cert check generate and add CA cert to my local machine. I am interested in trying the first one, but I am not sure how do I disable cert check. Can someone please help

I have found this so far, export GODEBUG="x509ignoreCN=0"

this is not working. Mac OS is 13.0

Score:0
ge flag

You need to add the 'unsigned' destination certificate to your MacOS Keychain and flag it as trusted.

user969640 avatar
gb flag
thank you for answering, I don't have the certificate with me, where can i get it?
ge flag
You could use ''curl'' to download the certificat from the server you try to connect to. Here is a example: openssl s_client -showcerts -connect server.edu:443 </dev/null 2>/dev/null|openssl x509 -outform PEM >mycertfile.pem
user969640 avatar
gb flag
thank you, I was able to download the certificate and add it to my key chain, but I am still seeing the error.
ge flag
Try this also: https://docs.docker.com/registry/insecure/
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.