GitHub public link format for accessing my website - github

I made a GitHub account. Ex: github.com/username
I made a repository (for a website) Ex: github.com/username/website
I'm new to GitHub, and initially, I thought the public access link to the website must http://website.github.io, but that doesn't work! All I'm getting is 404 no matter what I try.
I've tried the following examples:
username.github.io
username.github.io/username
username.github.io/website
username.github.io
website.github.io/website
username.github.com/website
but nothing works.
Finally, after an hour's worth of stumbling around, I realized that I would have to change my website's name to https://github.com/username/username so that http://username.github.io will work as the public link, Which I, obviously, don't want. I want http://website.github.io ideally or at least http://username.github.io/website
So, how do I make it work? How do my visitors access my website? Is it even possible to have it my way? If not, then do I have to make a new account for every new project? Won't that just defeat the purpose of a GitHub account?

So, how do I make it work?
https://username.github.io/projectname works for me, where username is of course my user name and projectname is the name of the repository. HTTP would probably be fine, but I checked the box to require HTTPS.
I want http://mywebsite1.github.io ideally
There's a "custom domain name" setting that purports to let you use your own domain, so you could something like http://myproject.mywebsite1.com/.
or at least http://UserName.github.io/mywebsite1
If mywebsite1 is the name of your project, you should be good to go -- that's the same format that worked for me above, except you're allowing http instead of just https.
Am I missing something crucial due to my day-0 newness on github?
It's possible that you've missed a step, or that you've restricted access to the project. It might help to go back to basics: forget everything you think you know and just follow their guide.

To create a website using GitHub pages you need to create an index.html file into any repository (No matter what name your repository is).
Then you need to publish your repository to be able to have your website.
First, go to your repository
Then go to Settings tab
Scroll down until you reach GitHub Pages
Then in source, you need to select your branch, in your case master branch
Then click on save and you are ready to go!!
Your repository will be online at http://username.github.io/yourRepoName
If your repository name is username.github.io your website will be live at http://username.github.io
Also, you need to know that you can only public static websites.
Understand GitHub Pages reading this.

Related

Change git account root folder, i.e mine is github.com/caverdude to github.com/somethingelse

I started my github account and I used a chat room handle for the root folder so that when you go to github.com/caverdude it's my stuff. I'd now like to change this caverdude to something more professional. Like my business name, or my name or something.
A google search turned up something totally different like changing the root folder in a repository.
Man, I've been there. I believe once you change your github username it will effectively change your repo root url.
fyi - I believe they will create redirects from the old urls to the new ones but only so long as another caverdude account isn't created. If another user named caverdude comes along at a later time the redirects from the old name to your new name will stop working.
Recently on a project I followed but hadn't really bookmarked or forked changed their name to something mysterious and it was a brief mystery as their old profile showed Github's custom 404/ not found. Eventually I tracked it back to their new, not-very-obvious name. All this to say, the whole "old redirects to new account" seems a might bit tenuous.
You can change your username in your account settings:
Click profile picture
Settings
Account
Change username
This will change your root folder on your profile page to the new username, and any links with your old name will show 404 error. So, you’ll need to update your links, but your repos will be updated with your new username. Here is the article from GitHub docs which gives you the steps and what happens after changing usernames :). Hope that helps, take care!

Jekyll problems with publishing on GitPages

I have just created my first jekyll page, trying to use github.io
What am I doing wrong, as the page seems to serve correctly on my local machine yet it does not on the GitPages.
If you want to use a github.io URL, the exact URL of your GitHub page depends on the name of your repository.
This is explained here in the GitHub Page documentation:
User, Organization, and Project Pages
If you want your website URL to be https://cstml.github.io/ (called "user page" in the docs), the repository must be named username.github.io, i.e. in your case:
https://github.com/cstml/cstml.github.io
If you want your website URL to be https://cstml.github.io/some-sub-dir (called "project page" in the docs), the repository must be named some-sub-dir, i.e. in your case:
https://github.com/cstml/some-sub-dir
In my search for trying to solve it I have changed the name of the repository to my cstml.github.io GitHub-pages and that seems to have fixed it. Don't really understand why that is at the moment but it seems to be working.

Github pages not accessible after deleting CNAME

I had a working github pages before at http://igghub.github.io/
I was trying to figure out how to add custom domain. I followed this guide from gh-pages on how to add custom domain. On my repo's Custom Domain setting, I nonchalantly added iggy.io and saved it. Silly me, I did not create DNS (I didn't know what it was until now).
Naturally, when I typed either igghub.github.io or iggy.io, it didn't work. So I deleted the iggy.io custom domain and saved it.
However, I am still unable to access github pages even after I cleared out custom domain! Everytime I try going to igghub.github.io it still redirects to iggy.io.
The last 2 commits showed that CNAME was finally deleted.
Why can't I access my old github-pages and why does github-pages still redirect me to the deleted custom domain?
Try clearing your browser cache, may have a temp or perm HTTP redirect stored in there

Github User Pages server DNS address could not be found

I'm currently trying to get my github pages site up and running.
I actually went through with the process about a month ago without a hitch.
I left it alone between now and then, but when I went to start messing with it again today, I found that the site wasn't publishing for some reason. I just get a "server DNS address could not be found" when I try to navigate to it.
I tried deleting the repo and recreating it, but that doesn't seem to work.
And of course, I've insured that the repo name matches my username (case-sensitive).
Additionally, I contacted Github support and they said that they could load the page just fine.
Here's the link if anyone would like to try it themselves.
EDIT: This is a "User" Page as opposed to a "Project" Page, so it shouldn't require a CNAME configuration.
Any ideas?
It looks like everything is working now. If you are still experiencing issues, please clarify a bit what it is you want to achieve.
In case you want to set up the site with a custom URL, you need to add a CNAME file to the repository. See the instructions here: https://help.github.com/articles/setting-up-your-pages-site-repository/

How to Setup Github Pages for account?

I am trying to figure out how to setup github pages for account rather than for a repository.
E.g
I want the blog address to be like this:
xxx.github.io rather than xxx.github.io/repo. Therefore when i go to xxx.github.iothe static markdown pages should appear rather than a 404 page.
Thanks.
You're looking for Pages' user / organization sites. The official site has a good getting started guide, but the first bit is the most important one:
Create a repository
Head over to GitHub and create a new repository named username.github.io, where username is your username (or organization name) on GitHub.
If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.
So, instead of creating a gh-pages branch as you would for a project site, you must create a repository that matches your user name.