我是Git的新手,已经设置好并创建了我的第一个存储库。我试图将README作为第一次提交添加,我一直在按照http://help.github.com/create-a-repo/上的步骤进行操作,但是我在这一步卡住了:
git push -u origin master
我收到了这个错误信息:
ERROR: username/Hello-World.git doesn't exist. Did you enter it correctly?
我认为问题出在我错误地使用了git remote add
命令:我忘记替换我的用户名和仓库名称。使用正确的参数重试后,命令如下:
$ git remote add origin git@github.com:christineh/Hello-World.git
fatal: remote origin already exists.
$ git push -u origin master
Enter passphrase for key '/Users/christinehorvat/.ssh/id_rsa':
ERROR: username/Hello-World.git doesn't exist. Did you enter it correctly?
fatal: The remote end hung up unexpectedly'
我该如何清理这个并获取正确的遥控器?
git remote add
命令中替换了你的用户名和 git 仓库名称,对吧? - Mathttp://help.github.com/create-a-repo/
上的步骤在 GitHub 上创建了一个叫做 Hello-World 的仓库。GitHub 提示我在本地机器上使用的远程设置命令是git remote add origin git@github.com:srivaths/Hello-World.git
。请注意,其中没有"用户名"。 - Sri Sankaranfatal: 远程源已经存在。
Christine-Horvats-MacBook-Pro-2:Hello-World christinehorvat$ git push -u origin master
输入密钥'/Users/christinehorvat/.ssh/id_rsa'的密码:
错误:username/Hello-World.git不存在。您是否正确输入?
fatal: 远程端意外挂起。 - Christine Horvat
git remote rm origin
命令,然后重新启动git remote add origin
命令,确保您准确地输入了您的 GitHub 用户名和仓库名称。 - Mat