Question

i cannot ping gitlab.com from my droplet (tried on other droplet)

Posted March 28, 2020 344 views
DNS

i try to do git pull and it return this

ssh: Could not resolve hostname gitlab.com: No address associated with hostname
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

and when i try to ping gitlab.com it return this

ping: gitlab.com: No address associated with hostname

i tried to ping from another droplet i own and the result is the same. is there a problem in your dns?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hello, @silentrazgriz

Could you please let me know if you’re having issues to connect/ping only to gitlab or you’re unable to ping other domains/hosts as well?

If the issue is occurring only with gitlab.com what you can do is to alter you droplet’s hosts file and enter the following line:

open the hosts file with your favorite text editor - vi, vim or nano

vim /etc/hosts

add the following line at the bottom of the file:

172.65.251.78 gitlab.com www.gitlab.com

You can then try to ping or access gitlab using ssh as well.

Hope this helps!

Regards,
Alex

i can ping to github fine. only gitlab had a problem. okay i’ll add the gitlab ip to hosts for now.

Submit an Answer