我如何解决这个问题,防止推动起源wrt。 GitHub的? [英] How do I resolve this issue of preventing push to origin wrt. GitHub?
问题描述
当我尝试使用将我的应用程序推送到 GitHub 时, /en.wikipedia.org/wiki/Git_%28software%29rel =nofollow> Git ,我得到以下内容:
$ git push origin master
输入密钥'/ c / Users / Medicine - SWEng / .ssh / id_rsa'的密码:
错误:找不到存储库。
致命:远程端意外挂起
运行的输出 git remote -v
:
$ git remote -v
heroku git @ heroku。 com:young-rain-273.git(fetch)
heroku git@heroku.com:young-rain-273.git(push)
origin git@github.com:SWEngineer7sample_app.git(fetch)
origin git@github.com:SWEngineer7sample_app.git(push)
sample git@github.com:SWEngineer / sample_app.git(fetch)
sample git@github.com:SWEngineer / sample_app .git(push)
如何解决这个问题?
<解决方案
错误消息是明确的(并且正确):
错误:没有找到存储库。
问题在于 origin
设置为 git@github.com:SWEngineer7sample_app.git
这肯定是错误的。显然,当你进入repo路径时,你没有按 SHIFT - 7 ,但只有 7 ,因此有一个 7 strong>哪里应该有一个 / 。简单来说就是一个错字。 $ b 样本$ c $相同c>(
git@github.com:SWEngineer / sample_app.git
),那么GitHub也会找到一个回购站。
为了解决这个问题,
git remote rm origin
git remote add origin git@github.com:SWEngineer / sample_app.git
When I try to push my application to GitHub using Git, I get the following:
$ git push origin master
Enter passphrase for key '/c/Users/Medicine - SWEng/.ssh/id_rsa':
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
Output of running git remote -v
:
$ git remote -v
heroku git@heroku.com:young-rain-273.git (fetch)
heroku git@heroku.com:young-rain-273.git (push)
origin git@github.com:SWEngineer7sample_app.git (fetch)
origin git@github.com:SWEngineer7sample_app.git (push)
sample git@github.com:SWEngineer/sample_app.git (fetch)
sample git@github.com:SWEngineer/sample_app.git (push)
How can I solve this issue?
The error message is clear (and correct):
ERROR: Repository not found.
The problem is that origin
is set to git@github.com:SWEngineer7sample_app.git
which is surely wrong. Obviously, you didn't press SHIFT-7, but only 7 when entering the repo path, therefore there's a 7 where there should be a /. Simply a typo.
origin
should be defined same as sample
(git@github.com:SWEngineer/sample_app.git
), then GitHub will also find a repo.
To resolve this,
git remote rm origin
git remote add origin git@github.com:SWEngineer/sample_app.git
这篇关于我如何解决这个问题,防止推动起源wrt。 GitHub的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!