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