Barely similar, and also helpful for static sites: an 3rd-party (and open source/self-hostable) option to password-protect (HTTP Basic Auth) files on S3:
Would be great if could have JavaScript which would perform the PR directly from user's browser to github instead of going through static man in the middle.