小编bur*_*tud的帖子

在 Windows 中的 Git 中克隆权限失败

当我在 Windows 10 v.1909上使用CMDPowerShell和 ssh-agent从 GitHub 克隆时,显示如下:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)

但是,我跑ssh -vT git@github.com了,钥匙确实有效

debug1: Offering public key: {My key}
Run Code Online (Sandbox Code Playgroud)

Hi {My username}! You've successfully authenticated, but GitHub does not provide shell access.
Run Code Online (Sandbox Code Playgroud)

但是使用 Git bash 我可以很好地克隆。

GitLab 也会发生这种情况。

我试过

Host *
 ForwardAgent yes
Run Code Online (Sandbox Code Playgroud)

.ssh/config,它不起作用。

我还尝试了GitHub 支持页面GitHub 社区论坛的所有解决方案,但仍然无效。

附注。我更喜欢 Windows cmd。

git ssh github

5
推荐指数
1
解决办法
1282
查看次数

标签 统计

git ×1

github ×1

ssh ×1