githubhttp-status-code-404github-pageshexo

Unable to Deploy Hexo Blog on GitHub Pages


I am attempting to deploy my blog on GitHub Pages using Hexo, but I am encountering a 404 error. I have tried numerous solutions but to no avail. Here are the details:

Node.js version: 9.7.2 Hexo version: 6.3.0 I can generate the page on my localhost (the hexo server command works as expected). I have correctly named my repository and set the deploy configuration in _config.yml as follows:

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: git
  repo: https://github.com/shioubi0216/shioubi0216.github.io.git
  branch: main

I have ensured that the local repository is synchronized with the remote repository. I have tried resetting the repository (deleting and recreating the GitHub Pages repository), but it didn't help. I have installed the hexo-deployer-git package using npm install hexo-deployer-git --save multiple times. I encountered a build failure with Jekyll at one point, and I set skip_render: true, but the website is still not working. I have checked the GitHub Pages troubleshooting guide for 404 errors, and the status seems fine. I don't believe I am using DNS, but here is the URL configuration in _config.yml:

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://shioubi0216.github.io/
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

I have cleared my browser cache and restarted my PC multiple times. I noticed that I don't have an index.html file. I had one in my Hexo directory earlier, but even with it, I couldn't deploy the site. I am unsure if this is related to the problem. I have verified that the repository on GitHub is on the main branch. Despite numerous attempts, I am unable to resolve this issue. I am turning to the Stack Overflow community for help. I am quite exhausted and considering resetting my PC if I can't find a solution soon. Any assistance would be greatly appreciated.

My github.io repo link


Solution

  • I set the repo: part of _config.yml to the original github Https link to SSH link, and it work! I have no idea why it work. but I success HAHAHA.