2

I meet a strange problem like this. I need to start an container and clone github project via ssh in side container i just created. Sometime git clone perfect, and there is no trouble. But some time it can't and say this:

ssh: Could not resolve hostname github.com: Try again
fatal: Could not read from remote repository.

I tried a lot of ways, like change mys /etc/resolv.conf by add google DNS, echo google DNS to /etc/resolv.conf inside container, restart docker, reinstall docker but no luck..
My git clone container join in to a docker user define bridge network. I think network is one of my problem but i don't know what exactly happen.
Another notice, everything work fine if i run it in local - ubuntu os. Problem only happen on my Linode serve
There is anyone meet this problem ? Please help me...

1
  • For someone who searching for this issue. I used the CentOS server. Just witch to use Ubuntu, then the problem is gone. Commented Aug 26, 2020 at 15:19

1 Answer 1

1

If you are using a lish shell session, try, as suggested here:

ssh -Tvvv [email protected]

And do a traceroute to see where the resolution fails.

Sign up to request clarification or add additional context in comments.

6 Comments

Thank for your response, i have tried debug conenct this way anf it hanging at the time connect to github... Coun't get any response or error wanning...
@TruongDang Do you have any ~/.ssh/config file?
Yes.. Here is what i did for my docker iamge. It work well in local machine echo -e "Host *\n\tStrictHostKeyChecking no\n\tIdentityFile /root/.ssh/id_rsa\n\tAddKeysToAgent yes\n" > /root/.ssh/config
@TruongDang Is your private SSH key passphrase protected?
@TruongDang OK so AddKeysToAgent might not be needed on Linode side. Does a ping github.com works (from Linode)?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.