Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
hg-git-push抱怨公钥_Git_Mercurial - Fatal编程技术网

hg-git-push抱怨公钥

hg-git-push抱怨公钥,git,mercurial,Git,Mercurial,到目前为止,我一直在使用fine,用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. 在此之后,我再次检查了我的公钥是否仍然存在并与我

到目前为止,我一直在使用fine,用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.
在此之后,我再次检查了我的公钥是否仍然存在并与我的git帐户关联。自上次推送后,除重新启动计算机外,没有任何更改。有人知道可能是什么问题吗?错误消息不是最有用的

我的.hgrc与往常一样:

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

[extensions]
hgext.convert=
hgext.bookmarks =
hggit =
[ui]
用户名=我的名字
[延期]
hgext.convert=
hgext.bookmarks=
高吉特=

您必须将您的公钥提供给GitHub(SSH代理或PageAnt,具体取决于操作系统)

您可以尝试SSH到
git@github.com
并确认它是否有效?您应该会收到一条消息,如“您好,[用户名]!您已成功通过身份验证,但GitHub不提供shell访问。”噢,不,我的权限被拒绝(公钥)。看起来这可能就是问题所在。HmmmSounds可能是您的本地SSH环境已更改(您是否重新生成了SSH密钥?),也可能是您通过设置页面从Github中删除了公钥。如果你在找它。。。GitHub让我推了15分钟才拒绝我,真是太好了:'(