我试图为GitHub添加一个空白的rails教程示例应用程序,但我得到了这个错误(显然很常见,但我在其他帖子中搜索了解决方案,但没有找到适合我的解决方案)。
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly当我尝试rails教程建议的内容时,我都得到了错误:
$ git remote add origin git@github.com:<username>/sample_app.git
$ git push -u origin master然后,我创建的github存储库显示了非常类似的提示:
$ git remote add origin https://github.com/<username>/sample_app.git
$ git push -u origin master我一直在sample_app目录中执行此操作,并在提交之后:
$ git commit -a -m "Improve the README"
(which is the last change I made and the only one before trying to push it to github)帮助?
发布于 2012-06-16 04:45:59
在尝试推送之前,您需要先在GitHub上执行create the repository。如果您不能让推送工作,请尝试:
从本地创建新的存储库repository.
克隆将正确设置您的遥控器,因此这通常是一种更简单的方法。
发布于 2014-05-02 21:48:02
发生这种情况的另一个原因是:当您连接到远程服务器时,ssh密钥没有加载。要解决此问题,您可以在~/.ssh/config中设置转发
Host *
ForwardAgent yes这将确保当您从另一台服务器连接到github时,您的密钥保持加载状态。
发布于 2019-05-23 10:17:19
在windows机上执行这些操作的一个奇怪之处在于,Windows可以缓存您的GitHub用户名和密码,即使您将u/p直接硬编码到URL中,这些用户名和密码也总是会通过网络发送。进入Windows凭据管理器并清除GitHub帐户凭据有时会有所帮助。

遇到git fatal: repository not found错误的其他五个常见原因包括:
authenticate
https://stackoverflow.com/questions/11057828
复制相似问题