git github 没有与名称关联的地址
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3283717/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
github no address associated with name
提问by ohana
I kept having problem with github these days, i created a new repository on github, then from local machine I tried to push my code to github:
这些天我一直在使用 github,我在 github 上创建了一个新的存储库,然后我尝试从本地机器将我的代码推送到 github:
git remote add origin [email protected]:tmi/logger.git fatal: remote origin already exists git push origin master ssh: github.com:uhdyi: no address associated with name fatal: the remote end hung up unexpectedly ssh git -v OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Fed 2007 ssh: git: no address associated with name ssh [email protected] Enter passphrase for key '/c/Documents and Settings/tmi/.ssh/id_rsa': Error: HI, tmi! you've successfullly authenticated, but GitHub doesn not provide shell access connection to github.com closed git push origin master ssh: github.com:uhdyi: no address associated with name fatal: the remote end hung up unexpectedly
what's wrong here? Thanks!
这里有什么问题?谢谢!
回答by mipadi
Look:
看:
fatal: remote origin already exists
You already have a remote named origin
, and it's still using the old, invalid URL. Open up .git/config
and change the URL for the origin
remote, or use the set-url
subcommand for git remote
:
您已经有一个名为 的遥控器origin
,但它仍在使用旧的、无效的 URL。打开.git/config
并更改origin
遥控器的 URL ,或使用以下set-url
子命令git remote
:
$ git remote set-url origin [email protected]:tmi/logger.git
回答by Ido Ran
I had the no address associated with name problem and after searching it was a DNS problem. The DNS simply was wrong on the machine and it could not find the IP address of the remote git repository.
我没有与名称问题相关的地址,搜索后是 DNS 问题。机器上的 DNS 只是错误,它找不到远程 git 存储库的 IP 地址。
回答by sanon
How would the error
怎么会报错
ssh git -v
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Fed 2007
ssh: git: no address associated with name
be related to
与...有联系
fatal: remote origin already exists?
Also couldn't that problem be solved by
那个问题也不能解决
git remote add someothername [email protected]:tmi/logger.git