生成github公钥

  1. 检查ssh公钥设置:

    如果id_rsa*文件不存在,跳到第三步;

    $ cd .ssh $ ls 
  2. 备份原来的ssh key:

    备份旧数据,备份后删除旧数据;

    $ mkdir key_backup $ cp id_rsa* key_backup $ rm id_rsa* 
  3. 生成github ssh key:

    $ ssh-keygen -t rsa -C "id@youremail.com" <github 帐号> Generating public/private rsa key pair. Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):<回车就好> 

    然后系统会要你输入加密串

    Enter passphrase (empty for no passphrase):<github密码> Enter same passphrase again:<再次输入密码> 

    最后看到下面信息就成功了

    Your identification has been saved in /Users/xxx/.ssh/id_rsa. Your public key has been saved in /Users/xxx/.ssh/id_rsa.pub. The key fingerprint is: ac:63:ff:c9:67:8f:c7:b7:26:43:77:83:bd:ef:11:be username@gmail.com The key's randomart image is: +--[ RSA 2048]----+ | | | | | | | . | | S .| | . ..| | + .o..| | . o . .o*o==| | ..+ooo*EO| +-----------------+ 
  4. 添加ssh key到github:

    复制id_rsa.pub的内容到github Account Settings -> SSH Keys -> add SSH Key -> Key

在github上使用octopress

  1. 在你本地安装octopress

    $ git clone git://github.com/imathis/octopress.git octopress $ cd octopress # If you use RVM, You'll be asked if you trust the .rvmrc file (say yes). $ ruby --version # Should report Ruby 1.9.2 $ gem install bundler # Install dependencies $ bundle install $ rake install # Install the default Octopress theme 
  2. 配置你本地的octopress

    • 创建github repo,名称username.github.com

    • 配置octopress使之与username.github.com关联

      $ cd octopress $ rake setup_github_pages Enter the read/write url for your repository (For example, 'git@github.com:your_username/your_username.github.com') Repository url: <git@github.com:yourname/yourname.github.com> 

    以上执行后会要求 read/write url for repository : git@github.com:yourname/yourname.github.com.git

  3. 初始化github

    $ rake generate $ rake deploy 

    等待几分钟后,github上会收到一封信:“[yourname.github.com] Page build successful”,第一次发布后等比较久,之后每次都会直接更新

  4. 将 source 也加入 git

    $ cd octopress $ git add . $ git commit -m 'your message' $ git push origin source 
  5. 更新 Octopress

    日后有 Octopress 新版本发布,使用以下指令升级。

    $ git pull octopress master # Get the latest Octopress $ bundle install # Keep gems updated $ rake update_source # update the template's source $ rake update_style # update the template's style 
  6. 编写并发布文章

    • 发表新文章:

      $ rake new_post["文章名称"] 

      该命令会在你的”octopress/source/_posts”目录下生成对应的”.markdown”文件,用任意文本编辑器编辑,使用markdown语法编写你的文章。

    • 生成:

      $ rake generate # generate your blog static pages content according to your input. 
    • 预览:

      $ rake preview # start a web server on "http://localhost:4000", you can preview your blog content. 
    • 发布:

      $ rake deploy # push your static pages content to your github pages repo ("master" branch) 
    • 生成并发布:

      $ rake gen_deploy 

GitHub+Octopress搭建免费blog的更多相关文章

  1. 使用github + Octopress 搭建免费博客 + 碰到问题的解决方法

    使用github + Octopress 搭建免费博客,先说碰到的问题,具体创建方法见下面. 问题1, 添加ruby淘宝链接问题,显示无法获取, 解决: source “http://ruby.tao ...

  2. 在github上搭建免费的博客

    github好多年前,大家都开始玩啦,我这个菜鸟近几年才开始.github不仅可以管理项目,还可以搭建博客.技术人员,一般用的博客为博客园,CSDN多一些.看到朋友们都弄一个,我也开始弄起来,先找点资 ...

  3. 使用jsdelivr + GitHub + PicGo搭建免费图床

    前言 之前一直有开通有道云笔记会员,主要是为了会员markdown图片可以在线保存的功能,前一阵子会员到期,考虑这个功能可不可以自己单独实现,从而替代使用有道云会员. 通过网上搜索的方式,查询到了几种 ...

  4. 教你如何使用github+jsDelivr搭建免费图床

    前言 之前写了一篇文章,教你如何使用Typora+PicGo实现图片自动上传到图床 . 这里我用的是七牛图床,七牛图床有一定的免费使用量(没记错的话应该是10个G),如果你的存储量超过这个大小就需要付 ...

  5. Octopress + GitHub Page 搭建个人博客

    Tips:博客已搬家,新地址:http://wanxudong.top 首先说明两个关键术语: Octopress Octopress是基于 Jekyll 的博客框架.他们的关系就像 jQuery 与 ...

  6. 利用Octopress在Github上搭建博客及后续问题总汇

    首先贴一下我的新博客地址: http://findingsea.github.io 用Octopress在GitHub上搭建博客已经不是什么新鲜事了,网上的教程也多了去了,大题的方法什么都差不多,这篇 ...

  7. 使用Jekyll搭建免费的Github Pages个人博客

    一.Git 1.Git概述 Git is a free and open source distributed version control system designed to handle ev ...

  8. 10分钟教你使用Picgo+GitHub+ jsDelivr搭建CDN加速免费图床

    前言 经常写Markdown或者博客的同学,肯定都要用到图床.图床是什么呢?其实相当于一个存储图片的网站,类似百度云这样,不过上传图片到图床后可以直接通过外链进行访问. 比如把本地一张a.jpg上传到 ...

  9. 记github上搭建独立域名的免费博客的方法过程

    前提:拥有github帐号,linux上安装好了git. 全局路线: 1. 设计一个你想要的二级域名,并在git上创建一个以[二级域名.github.com]作为项目名的repository. 过程详 ...

随机推荐

  1. Hadoop4.2HDFS测试报告之五

    第二组:文件存储读过程记录 NameNode:1 DataNode:1 本地存储 scp romotepath localpath 500 2 1 23.05 NameNode:1 DataNode: ...

  2. Python虚拟机之while循环控制结构(三)

    Python虚拟机中的while循环控制结构 在Python虚拟机之if控制流(一)和Python虚拟机之for循环控制流(二)两个章节中,我们介绍了if和for两个控制结构在Python虚拟机中的实 ...

  3. 微信小程序开发 -- 手机振动

    wx.vibrateLong(OBJECT) wx.vibrateLong(OBJECT) 方法使手机发生较长时间的振动(400ms) OBJECT参数说明: 参数名 类型 必填 说明 success ...

  4. 聊聊、Nginx 参数合法性

    我们接着上篇文章来讲讲 ngx_get_options 函数. 这个函数就在 nginx.c 文件中,我们来看看. 参数 argc,argv 我们在前面的文章中都已经提到了,在这里我们看 ngx_ge ...

  5. 【mysql 优化 5】左连接和右连接优化

    原文地址:8.2.1.8 Left Join and Right Join Optimization mysql以下列方式实现一个A left join B 连接条件: 1,表B设置为依赖于表A和A所 ...

  6. ThinkPHP3.2 杂记

    如果父类有_initialize()方法,子类用任何方法前都会调用父类的 _initialize方法,避免这种现象可以在子类中声明_initialize()方法,可以控制是否调用父类的_initial ...

  7. Git使用规范流程(转载)

    作者: 阮一峰 日期: 2015年8月 5日 团队开发中,遵循一个合理.清晰的Git使用流程,是非常重要的. 否则,每个人都提交一堆杂乱无章的commit,项目很快就会变得难以协调和维护. 下面是Th ...

  8. IDA Pro使用技巧及大杂烩

    IDA Pro使用技巧及大杂烩 IDA Pro基本简介 IDA加载完程序后,3个立即可见的窗口分别为IDA-View,Named,和消息输出窗口(output Window). IDA图形视图会有执行 ...

  9. HDU——2064汉诺塔III

    汉诺塔III Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Sub ...

  10. 刷题总结——小c找朋友(bzoj4264 集合hash)

    题目: Description 幼儿园里有N个小C,两个小C之间可能是朋友也可能不是.所有小C之间的朋友关系构成了一个无向图,这个无向图中有M条边. 园长ATM发现对于两个(不同的)小Ci和j,如果其 ...