【发布时间】:2013-12-11 01:52:54
【问题描述】:
我试图将我的文件推送到github,但我收到了这个错误。不幸的是,他们所谓的用户名都不起作用!有什么想法吗?
Monas-MacBook-Pro:first_app mona$ git push -u origin master
Username for 'https://github.com': lamiastella
Password for 'https://lamiastella@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/lamiastella/first_app.git/' not found
Monas-MacBook-Pro:first_app mona$ git push -u origin master
Username for 'https://github.com': jalal@wisc.edu
Password for 'https://jalal@wisc.edu@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/lamiastella/first_app.git/' not found
这是我在此命令之前使用的命令列表:
521 git init
522 git add .
523 git status
524 git commit -m "hi"
525 git status
526 git log
527 git checkout -f
528 git status
531 git remote add origin https://github.com/lamiastella/first_app.git
【问题讨论】:
-
@zerkms 在这里搜索“git push”ruby.railstutorial.org/… 我一直在关注这本手册,但我不确定我错过了什么
-
您错过了将 NOT EXISTING 存储库添加为
origin的事实。再次阅读文章中git push之前的一段:“注册后,点击链接创建仓库并按照图1.6填写信息。” -
@zerkms 啊,非常感谢。我忘了在 github 站点中创建一个存储库。但是,是否有任何用于创建名为 first_app 的存储库的终端命令?
-
有一个用于创建存储库的 GitHub API 端点:developer.github.com/v3/repos/#create 所以大概有一些工具可以使用它,但我从来没有想到过(创建存储库是一个罕见的过程,仍然需要你使用 github.com 来正确设置)
-
也有可能您还没有对该仓库的“推送”权限...
标签: git version-control github repository