npm install hexo-deployer-git --save # 配置git git config --global user.name "github用户名" git config --global user.email "github邮箱" git config user.name git config user.email ssh-keygen -t rsa -C "github邮箱" #将生成的id_pub内容复制到github->setting->ssh key里面 #使用ssh -T git@github.com验证 [root@control blog]# ssh -T git@github.com The authenticity of host 'github.com (20.205.243.166)' can't be established. ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM. ECDSA key fingerprint is MD5:7b:99:81:1e:4c:91:a5:0d:5a:2e:2e:80:13:3f:24:ca. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts. Hi wangyu1209! You've successfully authenticated, but GitHub does not provide shell access.
修改_config.yml文件
deploy: type: git repo: git@github.com:xxx/xxxx.github.io.git #此处可以查看github新建的仓库地址 branch: main