最终还是准备拿下GitHub Page
用hugo写好博客后,使用以下方法部署到Github Page
hugo # 生成public文件夹
cd /Documents/GitHub/blog-hugo/quickstart/public
git init
git remote add origin git@github.com:lf/lf.github.io.git
git add .
git commit -m 'init'
git push -f --set-upstream origin master
以上便可以生成网页版的个人博客,但是常常不能很顺利,比如问题:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
$ ssh-add -D
$ rm -r ~/.ssh #删除存在的密钥、公钥
$ ssh-keygen -t rsa -C "xxx@xx.com" #生成新密钥、公钥对应git邮箱
$ cat ~/.ssh/id_rsa.pub #查看公钥内容
后面再仔细斟酌,如何顺利ssh 访问remote repository
网友评论