解决[email protected]: Permission denied (publickey).

码云添加公钥按照官方文档一步步来,走到第四步会出现[email protected]: Permission denied (publickey),发现少了第二步,导致无法成功。

第一步,生成ssh-key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
第二步,添加id_rsa
ssh-add ~/.ssh/id_rsa
第三步,查看id_rsa.pub,复制后添加公钥
cat ~/.ssh/id_rsa.pub
第四步,确认并添加主机到本机SSH可信列表,若返回 Hi XXX! You've successfully authenticated, but Gitee.com does not provide shell access. 内容,则证明添加成功。
ssh -T [email protected]

你可能感兴趣的:(解决[email protected]: Permission denied (publickey).)