系统重装后快速恢复hexo
发布日期:2021-07-14 01:03:50 浏览次数:55 分类:技术文章

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

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

软件安装

Git和Node.js

配置git个人信息,生成新的ssh密匙

  • git config —global user.name “xxxxxx”
  • git config —global user.email “xxxxxx”
  • ssh-keygen -t rsa -C “xxxxxxxx(邮箱)”
    中间连按3个回车
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/Mr.Yang/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/Mr.Yang/.ssh/id_rsa. Your public key has been saved in /c/Users/Mr.Yang/.ssh/id_rsa.pub. The key fingerprint is: SHA256:zA6wNJrFB6NcqS6eBog/AHlzQuvFjYpG759Yhh1lWGI xxxxxx@xxxxx.xxx(上面自己的邮箱) The key's randomart image is: +---[RSA 2048]----+ |    +E .         | | ..+oo+          | | oo+*+.o         | |o.*===+o         | |==+*... S        | |B.+.o .o         | |++o. +  .        | | +o.+ .          | |.  o.o           | +----[SHA256]-----+

在GitHub上建一个新的ssh

  • 在用户->.ssh目录下已经得到了两个文件:id_rsa(私有秘钥)和id_rsa.pub(公有密钥)
    用记事本打开
  • 在GitHub右上角用户找到Settings
  • 在左边找到SSH…
  • new一个ssh,把id_rsa.pub里面的东西全放进去,标题随便起。
  • 在git bash 下输入命令检测是否成功
    ssh -T git@github.com
    1 2 3 4
    The authenticity of host 'github.com (207.97.227.239)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)?  # 直接输入yes Hi cnfeat! You've successfully authenticated, but GitHub does not provide shell access

安装hexo

  • npm install hexo-cli -g
  • 检测是否完成 hexo server
  • 部署hexo g && hexo d

解决每次部署都要输入账户密码的问题

  • git remote -v查看远程连接方式
  • git remote rm origin删除之前的连接方式
  • GitHub仓库复制SSH地址
  • git remote add origin SSH地址,连接方式改为SSh
  • git remote -v 查看发现已更改

转载地址:https://blog.csdn.net/cpongo3/article/details/89334346 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Balanced Lineup——RMQ
下一篇:How far away(倍增LCA)

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2024年04月18日 14时53分36秒