0

I am working on a Google cloud machine configured with Ubuntu 16.04. I have a personal github which can be accessed with an http url. I tried to clone the repository in to my local Ubuntu machine, it works. But when it comes to Google cloud machine, it shows the below error.

fatal: unable to access 'https://example.com/root/myapp.git/': SSL: certificate subject name (american-securities.com) does not match target host name 'example.com'

Can someone help me resolve this ?

Thanks in advance.

  • you use the exact same URL ? if you launch "openssl s_client -connect xxx:443" on both server, you have the same logs ? on localhost, you use https (not ssh) ? – wargre Aug 14 '17 at 11:55

1 Answers1

0

Most likely the reason for the incorrect resolving so the domain name does not match the certificate.

Check your resolve files:

cat /etc/resolvconf/resolv.conf.d/{base,head}
cat /etc/resolv.conf 

Try to set dns servers like:

nameserver 8.8.8.8
nameserver 8.8.4.4

Or set nameservers as on your local machine.

Quarind
  • 505
  • 1
  • 5
  • 9