How to fix HTTP 404 on Github Pages?
Here is my GitHub repository on the gh-pages
branch.
Everything looks good, I have my index.html
, my CSS, JS and pictures folders.
But when I access http://roine.github.com/p1 I get HTTP 404 not found.
Any explanation and solution?
I had just one commit with all my files. I pushed an empty commit, refreshed the page and it worked.
git commit --allow-empty -m "Trigger rebuild"
git push
If this doesn't work, as @Hendrikto pointed out in the comments, check out the Github status page and make sure GitHub Pages are operational.
I did all the tricks here on My Fork to fix page 404 on Github Page but it kept 404'ing.
Finaly found that my browser hardly keep the 10 minutes cache before it up on the web.
Just add /index.html
into the end of URL then it showed up and solved the case.
https://username.github.io/{repoName}/index.html
In my case, I had folders whose names started with _
(like _css
and _js
), which GH Pages ignores as per Jekyll processing rules. If you don't use Jekyll, the workaround is to place a file named .nojekyll
in the root directory. Otherwise, you can remove the underscores from these folders