简体   繁体   English

“ ssh:无法解析主机名github.com:再试一次”-docker容器内部

[英]“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.

相关问题 ssh:无法解析主机名 github.com:名称解析暂时失败 - ssh: Could not resolve hostname github.com: Temporary failure in name resolution CRON + GIT auth problem: ssh: Could not resolve hostname github.com: Temporary failure in name resolution - CRON + GIT auth problem: ssh: Could not resolve hostname github.com: Temporary failure in name resolution ssh:无法解析主机名 github.com:名称或服务未知; 致命:远端意外挂断 - ssh: Could not resolve hostname github.com: Name or service not known; fatal: The remote end hung up unexpectedly ssh:无法在eip = 68086014解析主机名github.com + STATUS_ACCESS_VIOLATION - ssh: Could not resolve hostname github.com + STATUS_ACCESS_VIOLATION at eip=68086014 docker 内部出现致命错误:无法访问<url>无法解析主机:github.com</url> - Inside docker got error as fatal: unable to access <url> Could not resolve host: github.com 无法解析主机github.com - Could Not Resolve Host github.com 无法推送到github,ssh:无法解析主机名 - Cannot push to github, ssh: Could not resolve hostname 无法解析主机:github.com BeagleBoard Black wireless - Could not resolve host: github.com BeagleBoard Black wireless 无法解析主机:github.com 仅在 windows bash - Could not resolve host: github.com ONLY in windows bash Kali Linux“无法解析主机github.com”错误 - Kali linux “could not resolve host github.com” error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM