部署Github Page的错误解决

262 字
1 分钟
部署Github Page的错误解决

前言#

结果没想到 hw 外的第一个 post 还是博客的问题 x

问题#

  1. 配置 Custom Domain:Your site’s DNS settings are using a custom subdomain, DOMAIN.com, that is not set up with a correct CNAME record. We recommend you change this to a CNAME record pointing to YOURNAME.github.io. For more information, see documentation (InvalidCNAMEError).
  2. 在 1 解决后:Domain does not resolve to the GitHub Pages server. For more information, see documentation (NotServedByPagesError).
  3. **在 2 解决后:**无法访问页面:ERR_CONNECTION_CLOSED

处理#

  1. 试了一下,发现是 CNAME 文件的问题(仓库根目录中 github 会自己新建的一个文件)
    简单来说就是 Custom Domain: www.DOMAIN.com -> DOMAIN.com
    另: 我使用的 Cloudflare 当时的 DNS 解析 (内容的 IP 跟我就行)
    IP 来源:

    Terminal window
    ping YourName.github.io
    类型名称内容
    A@185.199.108.153
    A@185.199.109.153
    A@185.199.110.153
    A@185.199.111.153
    CNAMEwwwYOURNAME.github.io
  2. 干等,DNS 似乎需要一定的生效时间,如果你配置跟我一样那么按理说是没有问题了

    1. 顺带一提:Enforce HTTPS 也是干等,不过我验证成功的一瞬间就可以点了
  3. 我在 Github Action 中 Re-run All Jobs 了一次,但似乎并不需要,总之干等,一切都会好起来的

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

Profile Image of the Author
Shiying
“魔法,是为了笑容而存在的。”我一直都如此坚信着。
存活记录
你找到这里了吧, 今天我也还活着, 大概...对了,无奖竞猜: 我今天看完西方哲学史了吗?
最新动态
站点统计
文章
7
分类
3
标签
5
总字数
4,068
运行时长
0 天
最后活动
0 天前