0

I tried to deploy the Hexo on my GithubPage.

The generate process looks fine, but error happens when I deploy it on my GithubPage.

Here's the deployment part in _config.yml:

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: https://github.com/ZhangYuef/ZhangYuef.github.io.git
# branch: Hexo

Generate

enter image description here

Deployment enter image description here

So what's going on there? Thx for help! :)

MarmiK
  • 5,639
  • 6
  • 40
  • 49
Boooooooooms
  • 306
  • 4
  • 21

3 Answers3

0

The context you provided in the question is not sufficient...

But according to invalid chars on the screenshot, I suppose that your Chinese file path may be the cause.

References:

Community
  • 1
  • 1
John Lee
  • 41
  • 3
0

try to update the _config.yml like this:

deploy:
  type: git
  repository: https://github.com/fakeYanss/fakeYanss.github.io.git
  branch: master

yaml is very very very strict, and indent is important!

yanss
  • 126
  • 1
  • 6
0

Not sure what reason causing this error. Check your environment whether these things have been set up. I think it might be your config type is wrong.

  • npm install hexo-deployer-git --save

  • git repository settings like

deploy: - type: git repo: git@github.com:xxx.git branch: master - type: git repo: git@github.com:xxx.git branch: src extend_dirs: / ignore_hidden: false ignore_pattern: public: . By this way, you can not only deploy your blog, but also backup your blog files, which you can use the command git pull to get the blog files on another machine. - set up your ssh ssh-keygen -t rsa -C "yourEmail@icloud.com" ssh-agent -s chmod id_rsa 600 ssh-add id_rsa (you need to add the id_rsa.pub to the github's deployer key) ssh -T git@github.com

  • sometimes it maybe you have several gits, make deployer confused. Try delete .git directory and make sure there is no any git in other directories.

  • encoding. It could be the encoding is different. In my case, I make all the files belong to UTF-8.

  • By the way, it could be your files' error.try npm install hexo-server --save and hexo server to detect whether the website can be deployed. (http://localhost:4000/xx)

tyrantqiao
  • 319
  • 4
  • 7