The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,731 other followers

Setting up a GitHub project so it is served over https as a github.io and a custom subdomain

Posted by jpluimers on 2022/04/27

Some links that helped me getting this working:

The goal is to have a githubstatus.wiert.me plain html (or maybe markdown) page that eventually will show some status information (kind of like githubstatus.com, but for different things).

Note that for free accounts, private repositories cannot publish pages: [Wayback] Troubleshooting custom domains and GitHub Pages – GitHub Docs:

GitHub Pages is available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see “GitHub’s products.”

[Wayback] GitHub’s products contradicts this by limiting GitHub Pages to only GitHub Pro and GitHub Team and higher levels.

Steps I did

Since there are quite a few links above, here are the steps I took from my github.com/jpluimers account:

  1. For  jpluimers.github.io/jpluimers (steps 1, 3, 4 and 5 were the key ones):
    1. Created a new GitHub repository github.com/jpluimers/jpluimers with license (in my case MIT license) and README.md (which by default is filled like this).
    2. Amended the README.md from my StackExchange profile.
    3. Enabled Pages publishing by switching the source from None to the main branch.
    4. GitHub automagically published it at jpluimers.github.io/jpluimers.
    5. Verified it was running at jpluimers.github.io/jpluimers (note there is no site at jpluimers.github.io yet – it shows a 404 error as in this archived version, see below why).
    6. Fixed the Twitter profile link so it is easier to find back my surviving rectal cancer story.
    7. Fixed the link to my www.race-checker.com running results as by now that is a Chinese Porn site because the underlying company 4Athletes Sports GmbH went belly up in 2019 (and still owns the race-checker trademark) and  updated the half marathon results as well.
    8. I verified the deployment actions at github.com/jpluimers/jpluimers/deployments/activity_log?environment=github-pages.
  2. For jpluimers.github.io (step 1 and 3 were the key ones):
    1. Created a new GitHub repository github.com/jpluimers/jpluimers.github.io with license (in my case MIT license) and README.md (which by default is filled like this: only one heading 1 line with the name of the repository).
    2. GitHub automagically set the source to the main branch, then published it at jpluimers.github.io.
    3. Verified it was running at jpluimers.github.io.
    4. I verified the deployment action at github.com/jpluimers/jpluimers.github.io/deployments/activity_log?environment=github-pages.
  3. For githubstatus.wiert.me :
    1. Created a new GitHub repository github.com/jpluimers/jpluimers.github.io with license (in my case MIT license) and README.md (which by default is filled like this: only one heading 1 line with the name of the repository).
    2. Enabled Pages publishing by switching the source from None to the main branch.
    3. I verified the jpluimers.github.io/githubstatus.wiert.me page existed (it will be gone soon).
    4. Set the custom domain to githubstatus.wiert.me.
    5. Now GitHub, after the DNS check, complained rightly that “githubstatus.wiert.me is improperly configured”, as it needs to be “set up with a correct CNAME record … We recommend you change this to a CNAME record pointing to jpluimers.github.io.”.
    6. So in the DNS settings panel of my wiert.me domain, I added a DNS record of type CNAME, with name githubstatus.wiert.me pointing to jpluimers.github.io.
      CNAME githubstatus.wiert.me Alias of jpluimers.github.io

      CNAME githubstatus.wiert.me Alias of jpluimers.github.io

      1. In retrospect, I should have reversed steps 6. and 4, as now this was the order of events, with a lot of waiting for the DNS to time-out.

        The DNS timeout was because githubstatus.wiert.me originally pointed via the DNS CNAME entry *.wiert.me to the blog at wiert.me, the timeouts were set by the domain provider (in this case WordPress.com), see the DNS nslookup information for *.wiert.me [Wayback/Archive.is].

        If I had set the DNS CNAME first, then the below list would have been much shorter.

        This was the order of events waiting for the DNS to timeout and the CNAME entry to take effect:

          1. Before entering the githubstatus.wiert.me custom domain “Your site is ready to be published at https://jpluimers.github.io/githubstatus.wiert.me/
          2. After entering the githubstatus.wiert.me custom domain:

            Your site is published at http://githubstatus.wiert.me/

            and a “Check Again” button preceded with:

            githubstatus.wiert.me is improperly configured
            Your site’s DNS settings are using a custom subdomain, githubstatus.wiert.me, that’s not set up with a correct CNAME record.

            We recommend you change this to a CNAME record pointing to
            jpluimers.github.io.

            and an “☐ Enforce HTTPS” checkbox followed by:

            Unavailable for your site because your domain is not properly configured to support HTTPS (githubstatus.wiert.me)

          3. After configuring the DNS information, and pressing the “Check Again” button the text briefly shows

            githubstatus.wiert.me DNS check is in progress.
            Please wait for the DNS check to complete.

            and an “☐ Enforce HTTPS” checkbox followed by:

            Unavailable for your site because your domain is not properly configured to support HTTPS (githubstatus.wiert.me)

          4. After a few minutes at the top of the page:

            Domain githubstatus.wiert,me is not eligible for HTTPS at this time.

            followed by the same “Check Again” button preceded with:

            githubstatus.wiert.me is improperly configured
            Your site’s DNS settings are using a custom subdomain, githubstatus.wiert.me, that’s not set up with a correct CNAME record.

            We recommend you change this to a CNAME record pointing to
            jpluimers.github.io.

          5. A few more minutes later:

            Requesting a certificate for githubstatus.wiert.me. It can take up to an hour to propagate.

            followed again by the above “Check Again” button.

          6. More than an hour later:

            Certificate already exists for githubstatus.wriert.me and is usable.

            followed again by the above “Check Again” button.

          7. The next morning, a green checkmark () had appeared behind the githubstatus.wiert.me custom domain and the text following the “☐ Enforce HTTPS” had by:

            HTTPS provides a layer of encryption that prevents others from snooping on or tampering with traffic to your site.

          8. Both these URLs now function correctly (so I can test a page both with and without TLS):

        The above order is typical for DNS timeouts on a distributed computing system like GitHub: some parts of the system are waiting for the DNS time out and therefore list failure, while some other parts already have had the updated DNS CNAME entry and therefore list success

    7. After waiting for the DNS timeout (this was a long wait, I probably should have reversed steps 6. and 4.), verified that https://githubstatus.wiert.me/ was loading fine.
    8. I verified the deployment actions at github.com/jpluimers/githubstatus.wiert.me/deployments/activity_log?environment=github-pages

Note: I saved the TLS information – including certificates here:

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: