有没有办法为 GitHub 页面禁用 SSL/TLS?

Is there a way to disable SSL/TLS for GitHub Pages?

我一直在寻找一个地方来公开存储我的一些 XML 模式,而不必实际托管它们。我认为 GitHub Pages 是理想的平台。我是对的,只是我不知道如何关闭 SSL/TLS。 当我尝试使用普通的旧 HTTP 获取我的页面时,我得到了 301 Moved Permanently 响应。

所以显然这不是什么大问题。最坏的情况是下载我的模式需要更长的时间,而且人们通常只使用他们已经缓存的模式。但是真的没有办法关掉吗?

But is there really no way to turn this off?

不,简单的 curl -L 会跟随重定向并为您提供页面内容。

例如(得到一个树状结构的xml文件):

vonc@vonvb C:\test
> curl --create-dirs -L -o .repo/local_manifests/local_manifest.xml -O -L https://raw.githubusercontent.com/legaCyMod/android_local_manifest/cm-11.0/local_manifest.xml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   530  100   530    0     0   1615      0 --:--:-- --:--:-- --:--:--  1743

vonc@voncvb C:\test
> tree /F .
C:\TEST
└───.repo
    └───local_manifests
            local_manifest.xml

来自github帮助:

HTTPS enforcement is required for GitHub Pages sites created after June 15, 2016 and using a github.io domain.

所以,你有两个解决方案:

  • 查找 github.io 早于 2016 年 6 月 15 日的存储库
  • set a custom domain 你的名字 github.io