这些天我一直遇到github的问题,我在github上创建了一个新的存储库,然后从本地机器我尝试将我的代码推送到github:
git remote add origin git@github.com: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 git@github.com 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
这里有什么问题?谢谢!
答案 0 :(得分:11)
查找
fatal: remote origin already exists
您已经有一个名为origin
的遥控器,它仍在使用旧的无效网址。打开.git/config
并更改origin
遥控器的网址,或使用set-url
的{{1}}子命令:
git remote
答案 1 :(得分:5)
我没有与名称问题相关联的地址,搜索后是DNS问题。 DNS在计算机上出错了,无法找到远程git存储库的IP地址。
答案 2 :(得分:4)
错误如何
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