HEXO Username&password Forced Solution

Today morning I got an idea that maybe I can change my blog’s theme to something good-looking, so I looked at a theme that makes me happy with it. And I cloned it into my blog and when I was trying to make it work, problems show.
1 I can’t Hexo g -d directly because of some access problem.
2 I must type in my Github username&password every when I type hexo g -d.
Error: Permission denied (publickey). fatal: Could not read from remote repository.
Solution:
First, Generate publickey for root: sudo ssh-keygen -t rsa -C "your mailbox", the corresponding path is /var/root/.ssh
Then, Extract the public key information and configure it to github. The problem is again, the root folder under / var is not accessible in the UI interface. We can bypass this problem by sudo cat /var/root/.ssh/id_rsa.pub.

And, all is well.

Thx to this blog

Share