修复 Hexo deploy 错误
运行 hexo d
时提示错误,按照网上提供的几种方法也无法修复,仍然报错。
1 | fatal: unable to access 'https://github.com/noviachen/noviachen.github.io.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 |
运行 ssh -T git@github.com
提示 git@github.com: Permission denied (publickey).
,怀疑是 SSH Key 丢失了。
打开终端,输入以下命令
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23ssh-keygen
#以下为执行结果
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/rahulwagh/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/rahulwagh/.ssh/id_rsa.
Your public key has been saved in /Users/rahulwagh/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:Okq3w+SesCGLQVToSBQru8RdUZtT2EIIrzH5MQ67DWA rahulwagh@local
The key's randomart image is:
+---[RSA 3072]----+
|.ooo..+oo. |
| oo o..o+. |
|=E = = +. |
|*oo X o . |
|.+ = o S |
|o. + .. |
|o ..+=+ |
| o + *++ |
|. . o.+. |
+----[SHA256]-----+可以在 /Users/your_user_name/.ssh 中找到
id_rsa.pub
,并复制其中的内容登录 Github,依次打开 GitHub Account -> Settings -> SSH and GPG keys
点击 SSH keys 右边的
New SSH key
,输入上面复制的内容,保存即可。重新运行
hexo clean && hexo g && hexo d
,大功告成。
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 方方小站!
评论