Private pages for a private Github repo

后端 未结 10 2046
耶瑟儿~
耶瑟儿~ 2020-11-30 17:28

Couldn\'t find anything in the github documentation and also here on SO. But I was wondering if there could be a http://foo.github.com for a private repository

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-30 18:11

    As outlined above, Github pages do not support that functionality. I had the same issue when our team decided to host project documentation (static HTML) internally and privately.

    I ended up creating a service https://www.privatehub.cloud It is basically a simple proxy server with Github OAuth authentication, so it merely returns your GitHub repository content with a proper MIME type. By design, only who have access to foo will be able to see foo content at https://bar-foo.privatehub.cloud. From functional point of view, you can think about it as a simplified GitHub pages with built-in authentication.

    Unfortunately, Github OAuth does not allow to request read-only access to private repos, so the server needs the full access (obviously, it does not write anything to your repo). As GitHub API allows to retrieve files under 1 Mb only, the service cannot return larger files. Yet, I found the service is quite suitable for small projects for internal documentation or staging version of a website.

提交回复
热议问题