使用远程github报错 Permission denied (publickey)

使用远程github报错 Permission denied (publickey).

好久没有维护博客了,今天上传文章是报了下面这个错
8B96E2EA-51C5-4357-BF0B-2B2BD445A83A

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: 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.

at ChildProcess.<anonymous> (/Users/tianhandelie/Desktop/Coldcrack/node_modules/hexo-util/lib/spawn.js:37:17)
at ChildProcess.emit (events.js:203:13)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

写了一大堆问题,在`git@github.com: Permission denied (publickey)我看明白了,大致原因就是链接远程仓库没有权限,然后我想起了我电脑ssh连着的码云的仓库,我用ssh -T git@github.com`切换过来,但是还是不行,那么有可能是ssh公钥的问题了,我重新配置了一下,配置教程在我一篇博客下面github和码云的SSH公钥

-------------本文结束感谢您的阅读-------------