问题
So I'm following this guide here to create a Github page
I created a repository, cloned it to my project directory and pushed, finally got to this last step:
Fire up a browser and go to http://username.github.io. Give it a couple of minutes for your page to show up—there will be a delay this very first time. In the future, changes will show up pretty much instantly.
My Github repo link is this: https://github.com/leongaban/gabanco
So I assumed my Github page link would be either:
http://leongaban.gabanco.github.io/
or
http://leongaban.github.io/
However neither link is working at the moment :(
Anyone create a Github page before? Eventually I want to try out Jekyll on it.
回答1:
Rename your project name to yourusername@github.com
.which mention in the document
This repository must use the username/username.github.io naming scheme.
Edit:
You can only use your own account name for a User or Org Pages repository. A repository like joe/bob.github.io will not build Pages.
回答2:
I'm not sure if the site just needed some time to show up, but I was getting a 404 error after pushing my master branch... Then I changed my 'theme' in the repo's settings. All of a sudden it started working! A file called config.yml
appeared with the theme metadata.
回答3:
If you have the correct repository name and you still get a 404 error a solution might be to push to the repository.
This is what worked for me. After the push it showed up instantly.
回答4:
Name your repository correctly, as stated in the first step:
Head over to GitHub and create a new repository named username.github.io, where username is your username (or organization name) on GitHub.
回答5:
I had the same problem. I fixed it by going to the Settings
for the repository and changing the name of the Repository to username.github.io
回答6:
In my case I had the correct repository name and still got a 404 error. Then I found this answer, so I made a change and pushed again. This time the changes from my first push showed up. So I waited for a while and then few minutes later, the changes from my second pushed showed up. It might just be the case that changes are not visible instantaneously.
回答7:
For me the second commit directly shown my Github page. This is very use.
回答8:
Turns out I had an error in my html file "No newline at end of file". Once I fixed this problem and did another Commit and Push, it worked.
回答9:
Try to push an empty commit and refresh the page. It should work.
git commit --allow-empty -m "Trigger rebuild"
git push
回答10:
I had the same problem. I think first you need to check out if YOUR Github Pages have been enabled. This you can check out from "setting". Then change whatever html web site from"github.com/username/repo1/repo2/repo3.../blob/master/file.html"
to "username.github.io/repo1/repo2/repo3.../file.html" .
Then have a try. Good luck.
回答11:
In my case, my page repository uses the username/username.github.io naming scheme, but still cannot work.
I just clone the repository to local, and new a push_test.txt file and push it to the repository, and then https://username.github.io works.
回答12:
Use the GitHub user name in the repository name first part. Wait 2 minutes after adding your age. Use google webmaster search console to verify the page you created in GitHub pages.
rahul-inspired-iosdeveloper.github.io
回答13:
The solution that solved the 404 error page was to change the Branch from Master to gt-pages
回答14:
In the case you have followed everything told in the steps such as : Repository name should be username.github.io
The main thing is you must add READ.md file to your repository. For sure your website will show up.
回答15:
I had same issue with Angular app. I forgot to make repo public :) Even tho i didn't use the username/username.github.io repo naming scheme it worked at <username>.github.io/<repo-name>
.
回答16:
My page was working, but then I tried to connect it to Heroku which led to a 404 error. After switching back to the original, I still got the error. I got around this by going in the settings of the repo and actually changing the name.
来源:https://stackoverflow.com/questions/20895543/my-new-github-page-isnt-showing-up