Go get <package> fails for self signed certificate


(Sony Joseph) #1

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?


(Johan Dahl) #2

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
Addresses: 140.82.118.3
140.82.118.4


(Lucas Alves) #3

@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


(Sony Joseph) #4

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


(Norbert Melzer) #5

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.


(Sony Joseph) #6

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


(system) closed #7

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