Go get <package> fails for self signed certificate

Hello friends,

I am a newbei in golang. When I am trying to : go get github.com/lib/pq I get bellow error.

fatal: unable to access ‘https://github.com/lib/pq/’: SSL certificate problem: self signed certificate in certificate chain

I am trying this from my Windows 10 laptop with in my organization network. Is there a way to get rid of this self-signed certificate issue?

Hi. github.com definitly dont use a selfsigned certificate. Which ip-address does github.com point to for you? It should be the two addresses in bold.

nslookup github.com
Server: xxxxx <- some nameserver on my network
Address: xxx.xxx.xxx <- its ip-address

Non-authoritative answer:
Name: github.com

@Sony_Joseph If you connect to GitHub with openssl you can make go get

openssl s_client -connect github.com:443

this disable verification, but I do not recommend, only for tests
git config --global http.sslVerify false

I am using Win 10 OS. Need to see how to make use of openssl. Thank you. I will analyse in that direction.

Corporate network? Or otherwise proxied?

If you are not using modules but “legacy” go path, then it should be “easy” as cloning the required packages by hand to the correct location.

Thanks for replying. It is coorprate network. I did as you mentioned to copy the file manually into the GOPATH.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.