【发布时间】:2020-06-13 19:07:48
【问题描述】:
我的 SSH 密钥与我的 Win10 机器和 Github 帐户配对,它在 Bash 上运行,但今天我通过 WSL 安装了 ZSH (oh-my-zsh),现在当我尝试推送时,我看到了下一个错误:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
在ZSH中:
ssh -T -ai ~/.ssh/id_rsa git@github.com
git@github.com: Permission denied (publickey).
在 Bash 中:
$ ssh -T -ai ~/.ssh/id_rsa git@github.com
Hi UserName! You've successfully authenticated, but GitHub does not provide shell access.
【问题讨论】:
-
你是通过 WSL 还是通过 Git Bash 使用
bash? -
请使用“-v”选项运行 ssh 以打印调试信息,然后 edit 您的问题包含调试输出。
标签: git github ssh zsh windows-subsystem-for-linux