【问题标题】:github no address associated with namegithub没有与名称关联的地址
【发布时间】:2010-07-19 18:05:39
【问题描述】:

这几天我一直遇到 github 的问题,我在 github 上创建了一个新的存储库,然后我尝试从本地机器将我的代码推送到 github:

git 远程添加源 git@github.com:tmi/logger.git 致命:远程来源已经存在 git push 起源大师 ssh: github.com:uhdyi: 没有与名称关联的地址 致命:远端意外挂断 ssh git -v OpenSSH_4.6p1,OpenSSL 0.9.8e 23 美联储 2007 ssh:git:没有与名称关联的地址 ssh git@github.com 输入密钥“/c/Documents and Settings/tmi/.ssh/id_rsa”的密码: 错误:你好,tmi!您已成功通过身份验证,但 GitHub 不提供 shell 访问权限 与 github.com 的连接已关闭 git push 起源大师 ssh: github.com:uhdyi: 没有与名称关联的地址 致命:远端意外挂断

这里有什么问题?谢谢!

【问题讨论】:

    标签: git github


    【解决方案1】:

    看:

    fatal: remote origin already exists
    

    您已经有一个名为 origin 的遥控器,但它仍在使用旧的无效 URL。打开.git/config 并更改origin 远程的URL,或使用set-url 子命令为git remote

    $ git remote set-url origin git@github.com:tmi/logger.git
    

    【讨论】:

    • ssh: git: no address associated with namefatal: remote origin already exists? 是两个独立的问题。前者的解决方法是什么?
    • 对我来说,ssh: git: no address associated with name 的发生是因为我的互联网连接在 VM 中中断
    【解决方案2】:

    我没有与名称问题相关的地址,搜索后是 DNS 问题。 机器上的 DNS 根本就是错误的,它找不到远程 git 存储库的 IP 地址。

    【讨论】:

    • 是的,我遇到了这个问题,我清除了我的 DNS 缓存。在 Windows 上,这是使用 ipconfig /flushdns 从命令提示符完成的,然后我可以毫无问题地运行我的 git 命令。因此,经验教训是 git bash 仍然使用本地操作系统 DNS 解析器。
    【解决方案3】:

    怎么会出错

    ssh git -v
    OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Fed 2007
    ssh: git: no address associated with name
    

    相关

    fatal: remote origin already exists?
    

    这个问题也解决不了

    git remote add someothername git@github.com:tmi/logger.git
    

    【讨论】:

    • ssh: git: no address associated with namefatal: remote origin already exists? 确实是两个独立的问题,不幸的是 mipadi 只回答后一个问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-10-18
    • 2022-10-04
    • 2023-03-05
    • 2021-11-13
    • 2020-03-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多