本文共 1055 字,大约阅读时间需要 3 分钟。
title: 解决使用hexo deploy推送代码到github仓库时重复输入账户密码
description: 解决使用hexo deploy推送代码到github仓库时重复输入账户密码 tags:cd ~/.ssh
使用ssh -Keygen 生成密钥
ssh-keygen -t rsa -C "your_email@example.com"
后面的输入均使用默认值,点击enter回车跳过
密钥生成成功
Your identification has been saved in /home/you/.ssh/id_rsa.Your public key has been saved in /home/you/.ssh/id_rsa.pub.The key fingerprint is:…………………此处是密钥内容…………………… your_email@example.com
点击复制
点击SSh and GPG keys,后新建一个SSh key
输入密钥的title,可自定义输入,下面的key的内容即为刚才生成的密钥内容,将其复制粘贴进去,后点击add ssh key即可创建成功
ssh -T git@GitHub.com
如果看到successfully,即为配置完成并且成功
# 修改 https 协议为 ssh 协议(仓库的ssh地址)git remote set-url origin git@github.com:xxx/xxx.git
# Deployment## Docs: https://hexo.io/docs/one-command-deploymentdeploy: type: git repository: git@github.com:looles/looles.github.io.git branch: master
ub.com:looles/looles.github.io.git
branch: master#### 6.部署推送到远程仓库
转载地址:http://pkwzi.baihongyu.com/