当我尝试使用Git将我的应用程序推送到GitHub时,我得到以下内容:
$ 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
Run Code Online (Sandbox Code Playgroud)
运行输出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)
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
错误消息是明确的(并且正确):
错误:未找到存储库.
问题是origin设置git@github.com:SWEngineer7sample_app.git为肯定是错误的.显然,你没有按SHIFT- 7,但只有7在进入回购路径时,因此有一个7应该有一个/.只是一个错字.
origin应该定义为sample(git@github.com:SWEngineer/sample_app.git),然后GitHub也会找到一个repo.
要解决这个问题,
git remote rm origin
git remote add origin git@github.com:SWEngineer/sample_app.git
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4292 次 |
| 最近记录: |