username.github.io pages not published as github pages

蹲街弑〆低调 提交于 2019-12-24 11:55:18

问题


I have Created the repository named as username.github.io and tried to access the same URL in browser but i'm getting 404 error.

Checked in repository settings -> Under Github Pages Section, But it was not showing the message "your site is published at username.github.io"

Apart from this, is there anything i have to do...

Screenshot: Actual URL: https://username.github.io


回答1:


To create a GitHub Pages site for your own username (i.e. a personal website and not a website for a repository), you need to replace the username part of username.github.io with your GitHub username. For example, if my username on GitHub is abcde, I would create a repository called abcde.github.io and then enable GitHub Pages in its settings as you have done.




回答2:


You need select source branch to publish(Initially it will be none. So nothing published) in
Settings -> Github pages --> source and click save. Then only it will be published to username.github.io URL.

Make sure your branch has index.html file.




回答3:


Normally, github pages URLs are generated as username.github.io/repo-name.

I'm not sure what naming the repo as you did would do, but in most cases, just name the repo as you normally would (a description of the project) and then publish the sites that way. If you already have code, here is how to rename the project in Github and updating the remote url

I'm not sure exactly why your pages aren't generating, but it likely has to do with the name of your repo.



来源:https://stackoverflow.com/questions/53611490/username-github-io-pages-not-published-as-github-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!