My new Github page isn't showing up

GitGithubGithub Pages

Git Problem Overview


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.

Git Solutions


Solution 1 - Git

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.

Solution 2 - Git

Try to push an empty commit and refresh the page. It should work.

git commit --allow-empty -m "Trigger rebuild"
git push

Solution 3 - Git

Rename your repository to <yourusername>.github.io as explained in the documentation.

> To publish a user site, you must create a repository owned by your user account that's named <user>.github.io.

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.

Solution 4 - Git

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.

Solution 5 - Git

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.

Solution 6 - Git

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

Solution 7 - Git

What I did was to add a README.md file. I typed something in the README.md and committed the change to the main branch and immediately, the page started showing. Here it is: https://akcumeh.github.io/03-sunnyside

Interestingly, I've never had to do that before to be able to view my site, but I had to do that today. I think someone mentioned this in a previous answer on this same thread...

Solution 8 - Git

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.

Solution 9 - Git

For me the second commit directly shown my Github page. This is very useful.

Solution 10 - Git

If you have named your repository correctly like <username>.github.io, and it is showing Github pages is under maintenance, then wait for a few minutes and then refresh. Your site will show up.

But, if it is showing 404 error, then check if you have index.html in your root folder and your Github pages setting is enabled from the settings tab.

Go to this link - https://github.com/<username>/<username>.github.io/settings And check Github Pages section in which you have to configure the Source.

Solution 11 - Git

you can simply change the folder from root to docs or vice versa.

It worked for me.

Solution 12 - Git

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.

Solution 13 - Git

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.

Solution 14 - Git

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.

Solution 15 - Git

go to project settings, and scroll down, find the github pages section. it might say you haven't choose a source. i chose one, and wait for 2 minutes, then it works.

Solution 16 - Git

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 pagesenter image description here.

rahul-inspired-iosdeveloper.github.io

Solution 17 - Git

The solution that solved the 404 error page was to change the Branch from Master to gt-pages

Solution 18 - Git

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.

Solution 19 - Git

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>.

Solution 20 - Git

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.

Solution 21 - Git

Make sure that index.html file is present in your code otherwise it will give 400 error

Solution 22 - Git

Don't forget to enable Git Pages example

Solution 23 - Git

One other datapoint: check your branch.

When you create a new repo, the default branch is "main". The branch required for the GitHub page is "master".

Solution 24 - Git

If anyone else is using the gh-pages NPM library to deploy (i.e. for a React app), you need to do one more step after deploying.

From your GitHub settings page, scroll down to "GitHub Pages" and change the source branch to "gh-pages". This branch should created automatically for you once you deploy your app.

Solution 25 - Git

In my case it happened because i had my index.html file inside a folder from a main branch. For it to work you must have a file index.html directly just inside your first repositories not in any folders or sub-folders inside it. That's it.

Solution 26 - Git

Just do not panic and rename your GitHub Repository and view your page it gets uploaded and you can rename it to original name then after.

Solution 27 - Git

Adding the theme worked for me as well. Initially I thought I might have to wait longer for the index file to load, but it hasn't taken that long on prior repo's I have done.

Steps:

  1. Click on Settings in the Repo
  2. Click on Pages
  3. Click Change Theme

Simply add a theme and it should load the published page url.

Solution 28 - Git

Maybe you need to add readme file, because after I waited 15 minutes I added it, after that it worked

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLeon GabanView Question on Stackoverflow
Solution 1 - GitLoganView Answer on Stackoverflow
Solution 2 - GitTwin CaretView Answer on Stackoverflow
Solution 3 - GitjohnMaView Answer on Stackoverflow
Solution 4 - GitCosmin BacanuView Answer on Stackoverflow
Solution 5 - GitNjolView Answer on Stackoverflow
Solution 6 - GitgmcView Answer on Stackoverflow
Solution 7 - GitAngel UmehView Answer on Stackoverflow
Solution 8 - GitKshitij BajracharyaView Answer on Stackoverflow
Solution 9 - GitMohammad Zaid PathanView Answer on Stackoverflow
Solution 10 - GitMohit BadveView Answer on Stackoverflow
Solution 11 - GitSoham GroverView Answer on Stackoverflow
Solution 12 - GitcostFuncView Answer on Stackoverflow
Solution 13 - GitcumtlkqView Answer on Stackoverflow
Solution 14 - GitDZxView Answer on Stackoverflow
Solution 15 - GittothedistanceView Answer on Stackoverflow
Solution 16 - GitRahul K RajanView Answer on Stackoverflow
Solution 17 - Gituser2436802View Answer on Stackoverflow
Solution 18 - GitKaran sharmaView Answer on Stackoverflow
Solution 19 - GitcarbonmonoxideView Answer on Stackoverflow
Solution 20 - GitCB721View Answer on Stackoverflow
Solution 21 - GitAshok sharmaView Answer on Stackoverflow
Solution 22 - GitMark KahnView Answer on Stackoverflow
Solution 23 - GitlzntView Answer on Stackoverflow
Solution 24 - GitPaul RupkeView Answer on Stackoverflow
Solution 25 - GitSebak ThapaView Answer on Stackoverflow
Solution 26 - GitSebak ThapaView Answer on Stackoverflow
Solution 27 - GitBrian DoneView Answer on Stackoverflow
Solution 28 - GitFeras AlkilaniView Answer on Stackoverflow