certificatehostnamemismatch while installing google cloud SDK?

267 Views Asked by At

I met a certificationhostnamemismatch error while installing google clould SDK. The error message looks like this:

.... httplib2.certificatehostnamemismatch: server presented certificate that does not match host dl.google.com ....

Does anyone know how to fix it?

1

There are 1 best solutions below

0
On

I searched on the internet and found that might be several reasons:

  1. the python version
  2. the host file

I checked my environment and found that the host file was changed to access google websites for convenience. So I removed the host file. Now everyting works fine.