博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
2021-01-03-设解决使用hexo deploy推送代码到github仓库时重复输入账户密码
阅读量:3950 次
发布时间:2019-05-24

本文共 1055 字,大约阅读时间需要 3 分钟。


title: 解决使用hexo deploy推送代码到github仓库时重复输入账户密码

description: 解决使用hexo deploy推送代码到github仓库时重复输入账户密码
tags:

  • hexo
  • 博客
  • github
    categories: hexo
    date: 2021-01-03 19:44:00

解决使用hexo deploy推送代码到github仓库时重复输入账户密码

1.生成SSH密钥

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

点击复制

2.设置GitHub仓库的密钥

点击SSh and GPG keys,后新建一个SSh key

image-20210103194924377

输入密钥的title,可自定义输入,下面的key的内容即为刚才生成的密钥内容,将其复制粘贴进去,后点击add ssh key即可创建成功

image-20210103195020682

3.测试配置是否成功

ssh -T git@GitHub.com

如果看到successfully,即为配置完成并且成功

image-20210103195309236

4.修改博客Git远程提交的地址

# 修改 https 协议为 ssh 协议(仓库的ssh地址)git remote set-url origin git@github.com:xxx/xxx.git

5.修改hexo根目录下的_config.yml文件中的远程仓库设置

# Deployment## Docs: https://hexo.io/docs/one-command-deploymentdeploy:  type: git  repository: git@github.com:looles/looles.github.io.git  branch: master

6.部署推送到远程仓库

ub.com:looles/looles.github.io.git

branch: master

#### 6.部署推送到远程仓库

转载地址:http://pkwzi.baihongyu.com/

你可能感兴趣的文章
ES查询流程源码解析
查看>>
ldaps与ldap over TLS
查看>>
jvm为什么把-Xms和-Xmx的值设置成一样
查看>>
2021-01-21对map进行key或者value排序
查看>>
ConcurrentHashMap 1.7和1.8的区别
查看>>
阻塞锁与自旋锁
查看>>
【面试官:select语句和update语句分别是怎么执行的
查看>>
scala学习之安装问题
查看>>
LDAP常见错误码
查看>>
linux yum安装rpm包出现问题
查看>>
idea编译报错类似xxx.java:[85,65] 错误: 找不到符号
查看>>
ArrayList复制
查看>>
idea打开项目时,文件左下角显示橙色J
查看>>
SQL注入
查看>>
linux中ldconfig的使用介绍
查看>>
ldap适合入门学习
查看>>
ldap学习参考博客
查看>>
linux学习之source命令与alias(别名)使用
查看>>
MYSQL常用查询
查看>>
安装Linux虚拟机绑定IP操作
查看>>