1.添加SSH Key:
[html]
ssh-keygen -t rsa -C "邮件地址"
输入命令之后就回车,会出现以下提示,回车
[html]
Enter file in which to save the key (/home/lqg/.ssh/id_rsa):
接着提示输入解密钥的加密串:
[html]
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
输入后有以下提示为成功:
[html]
Your identification has been saved in /home/lqg/.ssh/id_rsa.
Your public key has been saved in /home/lqg/.ssh/id_rsa.pub.
The key fingerprint is:
91:0f:4e:ec:89:ad:3b:75:d1:32:a9:f1:59:ee:8f:
The key's randomart image is:
+--[ RSA 2048]----+
| |
| . . |
| * o |
| *.== o |
| . S+.B |
| .o + . |
| .. . . |
| .. .o . |
| .. ..E |
+-----------------+
紧接着,vim ~/.ssh/id_rsa.pub,复制全部内容,
最后转到github页面,在account setting里面选择ssh key - add key ,把前面复制的内容粘帖,保存。。。
敲句命令测试下:
[html]
ssh -T git@github.com
[html]
Hi <em>username</em>! You've successfully authenticated, but GitHub does not provide shell access.
2.在github页面上添加一个项目库 create a new repo ,库名为 username.github.com (本人为:lqg1122.github.com);
然后在本地创建同名文件夹
[html]
mkdir lqg1122.github.com
cd lqg1122.github.com
3.由于利用到开源的blog 框架 Jekyll-Bootstrap,故要把代码给下载下来
[html]
git clone https://github.com/plusjade/jekyll-bootstrap.git
git add .
git commit -m "提交信息:first commit"
git push origin master
代码提交完成之后稍等几分钟,打开username.github.com 就可以看到一个blog 模型了,在经过自己修改,自定义之后才变成自己的专属博客哦。。偷懒的话, 本地上要安装 rake ,然后在项目文件夹里面输入主题相应的安装命令,在把修改的代码
提交就好了。。。。。www.2cto.com
[html]
sudo apt-get install rake
rake theme:install git="https://github.com/jekyllbootstrap/theme-the-program.git"
git add .
git commit -m "提交信息:first commit"
git push origin master