这些天我一直遇到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
这有什么不对?谢谢!
看:
fatal: remote origin already exists
您已经有一个名为的遥控器origin
,它仍在使用旧的无效网址.打开.git/config
并更改origin
远程URL ,或使用set-url
子命令git remote
:
$ git remote set-url origin git@github.com:tmi/logger.git
我有没有与名称问题相关的地址,搜索后它是一个DNS问题.DNS在计算机上出错了,无法找到远程git存储库的IP地址.