git 我的新 Github 页面没有显示
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20895543/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
My new Github page isn't showing up
提问by Leon Gaban
So I'm following this guide here to create a Github page
所以我在这里按照本指南创建一个 Github 页面
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
我的 Github 仓库链接是这样的:https: //github.com/leongaban/gabanco
So I assumed my Github page link would be either:
http://leongaban.gabanco.github.io/
所以我假设我的 Github 页面链接是:http:
//leongaban.gabanco.github.io/
or
或者
However neither link is working at the moment :(
但是目前这两个链接都不起作用:(
Anyone create a Github page before? Eventually I want to try out Jekyll on it.
有人创建过 Github 页面吗?最终我想在上面试用 Jekyll。
采纳答案by johnMa
Rename your project name to [email protected]
.which mention in the document
将您的项目名称重命名为[email protected]
.which 在文档中提及
This repository must use the username/username.github.io naming scheme.
此存储库必须使用 username/username.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.
您只能将自己的帐户名用于用户或组织页面存储库。像 joe/bob.github.io 这样的存储库不会构建页面。
回答by Logan
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.
我不确定该站点是否只需要一些时间来显示,但是在推送我的主分支后我收到了 404 错误......然后我在 repo 的设置中更改了我的“主题”。突然间它开始工作了!一个名为的文件config.yml
与主题元数据一起出现。
回答by Cosmin Bacanu
If you have the correct repository name and you still get a 404 error a solution might be to push to the repository.
如果您有正确的存储库名称,但仍然收到 404 错误,解决方案可能是推送到存储库。
This is what worked for me. After the push it showed up instantly.
这对我有用。推送后,它立即出现。
回答by Njol
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.
转到 GitHub 并创建一个名为username.github.io的新存储库 ,其中 username 是您在 GitHub 上的用户名(或组织名称)。
回答by Twin Caret
Try to push an empty commit and refresh the page. It should work.
尝试推送空提交并刷新页面。它应该工作。
git commit --allow-empty -m "Trigger rebuild"
git push
回答by Kshitij Bajracharya
In my case I had the correct repository name and still got a 404 error. Then I found thisanswer, 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.
就我而言,我有正确的存储库名称,但仍然出现 404 错误。然后我找到了这个答案,所以我进行了更改并再次推送。这次我第一次推送的变化出现了。所以我等了一会儿,几分钟后,我第二次推送的变化出现了。可能只是更改不是立即可见的情况。
回答by Zaid Pathan
回答by gmc
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
我有同样的问题。我通过转到Settings
存储库并将存储库的名称更改为username.github.io
回答by DZx
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.
原来我的 html 文件中有一个错误“文件末尾没有换行符”。一旦我解决了这个问题并再次提交和推送,它就起作用了。
回答by Rahul K Rajan
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.
在存储库名称第一部分中使用 GitHub 用户名。添加您的年龄后等待 2 分钟。使用 google 网站管理员搜索控制台验证您在 GitHub pages 中创建的页面。
rahul-inspired-iosdeveloper.github.io