Github Pages 服务器会允许 .htaccess 和 .htpasswd 吗?

Will Github Pages servers allow .htaccess and .htpasswd?

我只是想知道我是否可以将此处找到的脚本 (https://davidwalsh.name/password-protect-directory-using-htaccess) 用于 Github 页面。服务器适合这种脚本吗?我知道它肯定适用于 Apache 服务器,但我不知道 Github 有什么类型的服务器。

不,你不能。

Github 页面可让您托管静态内容。仅此而已。

没有服务器端代码。无需重新配置其服务器。没有身份验证。只是静态内容。

您可以使用 .htaccess,但 .htpassword 不起作用。另外,

<Files>

无效。