【发布时间】:2021-03-01 12:42:57
【问题描述】:
我想从我的 shell 添加远程存储库但失败了。我已登录,并且在我的本地存储库中。所以我输入这个:
% git remote add origin https://github.com/<username>/example.git
% git remote -v
origin https://github.com/<username>/example.git (fetch)
origin https://github.com/<username>/example.git (push)
所以似乎已经创建了 repo。但是我在我的 github 帐户中没有看到新的 repo。当我尝试检查遥控器(或在那里推送任何东西)时,它会引发错误:
% git remote show origin
remote: Repository not found.
fatal: repository 'https://github.com/<username>/example.git/' not found
我尝试用谷歌搜索类似的问题,但找不到答案。有谁知道我可能会错过什么?
【问题讨论】:
-
如果您正在寻找在 GitHub 上创建存储库而不是使用其 GUI 的方法(就像我经常喜欢的那样),请查看 Hub CLI hub.github.com
-
您好,欢迎来到 SO。请看what you can do when someone answers your question。
-
@konekoya
hub已替换为gh作为新的官方 github cli。 cli.github.com
标签: git github git-remote