【发布时间】:2021-05-20 03:50:09
【问题描述】:
今天早上我的 Windows git 客户端让我大吃一惊
> git pull
git@github.xxx.net: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
尽管使用 GitHub 的 SSH 身份验证有效,但仍会发生这种情况
>ssh git@github.xxx.net
PTY allocation request failed on channel 0
Hi dzieciou! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.xxx.net closed.
这可能是原因吗?我拥有访问此特定项目的所有必要权限。
【问题讨论】:
-
你使用
git@github.com:username/repourl 作为远程吗?您是否检查过您可以访问浏览器中的存储库? -
@MaartenDev 这是 GitHub Enterprise,但没关系:URL 是正确的
git@github.xxx.net:organization/repo.git,我可以从 Web 浏览器和 Ubuntu 访问这个 repo。看起来像 Git 客户端和 Windows 上的 SSH 之间的一些集成问题。昨天还可以。 -
您是否尝试过调试步骤:docs.github.com/en/github/authenticating-to-github/… 以验证是否使用了正确的密钥文件?