hg-git push 抱怨 public key

hg-git push complaining about public key

我一直在使用 hg-git 直到现在,用 mercurial 从我的 git 仓库中推拉。今天突然出现以下错误:

❯ hg push
pushing to git+ssh://git@github.com/User/myrepo.git
Permission denied (publickey).
abort: git remote error: The remote server unexpectedly closed the connection.

在此之后,我仔细检查了我的 public 密钥实际上仍然存在并且与我的 git 帐户相关联。自从我上次推送以来,除了重新启动计算机外,没有任何变化。任何人都知道可能是什么问题?错误消息不是最有帮助的。

我的 .hgrc 就是普通的:

[ui]
username = My Name <myname@domain.com>

[extensions]
hgext.convert=
hgext.bookmarks =
hggit =

您必须将 public 密钥 提供给 GitHub(SSH 代理或 PageAnt 取决于 OS)