如何修复 Github 页面上的 HTTP 404? [英] How to fix HTTP 404 on Github Pages?

查看:29
本文介绍了如何修复 Github 页面上的 HTTP 404?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是我在 gh-pages<上的 GitHub 存储库/code> 分支.一切看起来都不错,我有我的 index.html、我的 CSS、JS 和图片文件夹.

Here is my GitHub repository on the gh-pages branch. Everything looks good, I have my index.html, my CSS, JS and pictures folders.

但是当我访问 http://roine.github.com/p1 时,我得到的不是 HTTP 404找到了.

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

如果这不起作用,正如@Hendrikto 在评论中指出的那样,请查看 Github 状态页面并确保 GitHub Pages 正常运行.

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.

这篇关于如何修复 Github 页面上的 HTTP 404?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆