Git Error | git@ssh.github.com: Permission denied (publickey).
密钥已经生成好,在Github
上已经新建了SSH Key
,在运行命令:ssh -T git@github.com
,报错:
git@ssh.github.com: Permission denied (publickey).
解决方案:
把对应的私钥添加到SSH-Agent
中
eval $(ssh-agent -s)
确保SSH-Agent 运行ssh-add ~/.ssh/id_XXXX
添加私钥
参考:
SSH-Agent 详解