125 字
1 分钟
配置ssh

Hexo 使用 SSH 部署到 GitHub 完整指南#

生成 SSH Key#

在命令行(CMD、PowerShell 或 Git Bash)执行:

Terminal window
ssh-keygen -t rsa -C "GitHub-Email@example.com"

测试ssh#

Terminal window
ssh -T git@github.com

第一次连接时会提示:

Terminal window
The authenticity of host 'github.com (IP)' can't be established.
Are you sure you want to continue connecting (yes/no)?

输入yes并回车,如果显示:

Terminal window
Hi <用户名>! You've successfully authenticated...

说明SSH配置成功

注意事项#

默认SSH端口会使用22端口,若22端口被墙,则用443端口。

22端口格式:

Terminal window
git@github.com:User/repo.git

443端口格式:

Terminal window
ssh://git@ssh.github.com:443/User/repo.git
配置ssh
https://visa-aliso.github.io/posts/ssh-setup/
作者
Aliso
发布于
2025-09-09
许可协议
CC BY-NC-SA 4.0
评论