How to ignore x509 certificate on Mac terminal

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

  1. ignore this cert check
  2. generate and add CA cert to my local machine.

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

this is not working. Mac OS is 13.0
I am interested in trying the first one, but I am not sure how do I disable cert check. Can someone please help

Please let me know if this is not the right forum for the question