Update:10.21
更新博客想rake deploy时出现
updates were rejected because the tip of your current branch is behind its remote counterpart
这贴:
http://allenyee.me/blog/2013/08/21/what-i-learned-from-hosting-octopress-on-github/
I resolved this by going to _deploy folder:
cd octopress/_deploy
Since the master branch is inside deploy, I did a:
git pull origin master
I then resolved conflicts, and pushed the commit. Now, I return to octopress folder:
cd ..
Try:
rake deploy
Old:10.19
参考这帖子http://shanewfx.github.io/blog/2012/02/16/bulid-blog-by-octopress/
作为一个git新手,完全不懂ruby的人来说,搭这个blog真的太desperate了...
一开始用乌龟git绑定git账号,但是出错failed to create locked file,应该是我以前绑定过另外一个账号,那个账号已经不能用了(学校提供的),然后残留历史记录,于是怎么搞也搞不定...然后怒卸tortoisegit...
因为之前在已经注册了github账号,装了个github for windows,所以ssh key 已经有了。
之后安装Ruby
ruby dk.rb init
ruby dk.rb install
gem install rdiscount --platform=ruby
安装octopress一路顺利。之后,
rake generate
rake preview
rake deploy
google后得知可能公匙有问题?于是将当前公匙删掉,按照上面提到那帖子重新生成公匙。我保证完全按照“正确”的方法做的,而且好多网站(国内)提到的方法都是一样,不过生成的公匙显示never used...令人不得不怀疑这又有问题...
在stackoverflow上看到http://stackoverflow.com/questions/4269922/permission-denied-publickey-when-deploying-heroku-code-fatal-the-remote-end
octopress keys:add ~/.ssh/id_rsa.pub
貌似执行以上命令后,重新生成了一个“能被使用”的ssh...而这key的备注是git for windows...不明白...deploy失败应该不关ssh的问题。
google后,使用各种command,刨根问底后,提示origin does not appear to be a git repository
然后在这里找到方法http://blog.csdn.net/dengjianqiang2011/article/details/9260435
git remote add origin URL
最后不知道怎么的就deploy成功,能上传东西了,好奇怪...
然后就是博客的名字一定要和你github用户名一样!这点教程也没提到= =否则会404...
git add .
以为万事大吉啦,github官方发了份email来:
The page build failed with the following error:
The tag `include_array` in `index.html` is not a recognized Liquid tag.
For more information, see https://help.github.com/articles/page-build-failed-unknown-tag-error.
不知道怎么回事...最后将提示的代码删掉后重新部署,最后成!功!了!