How to fix HTTP 404 on Github Pages?

Jonathan de M. picture Jonathan de M. · Jul 20, 2012 · Viewed 168.5k times · Source

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?

Answer

Arnaud picture Arnaud · Aug 27, 2017

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.