[英]“ssh: Could not resolve hostname github.com: Try again” - Inside docker container
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.
我需要启动一个容器,并通过ssh在我刚刚创建的辅助容器中克隆github项目。 Sometime git clone perfect, and there is no trouble.
有时候git clone很完美,没有麻烦。 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.. 我尝试了很多方法,例如通过添加google DNS来更改mys
/etc/resolv.conf
,将google DNS回显到容器内的/etc/resolv.conf
中,重新启动docker,重新安装docker但没有运气。
My git clone container join in to a docker user define bridge network. 我的git clone容器加入了docker用户定义网桥网络。 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. 另一个通知,如果我在本地-ubuntu os上运行,一切正常。 Problem only happen on my
Linode
serve 问题仅在我的
Linode
服务上发生
There is anyone meet this problem ? 有谁遇到这个问题? Please help me...
请帮我...
If you are using a lish shell session , try, as suggested here : 如果您正在使用lish shell会话 ,请尝试按照此处的建议进行操作 :
ssh -Tvvv git@github.com
And do a traceroute to see where the resolution fails. 并执行traceroute以查看解析失败的地方。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.