use*_*448 14 html git web-access gitlab
我想用来Gitlab管理Web应用程序开发.是否可以从浏览器访问html我在我的文件中创建的文件Gitlab repo?
目前有ssh/http访问回购的网址,如:
ssh: git@something.some.ca:balbal/web-app.git
http: (ht tps://something.some.ca:balbal/web-app.git)
Run Code Online (Sandbox Code Playgroud)
当我https从浏览器访问它时,它将跳转到git repo管理UI(比如显示所有提交,分支和详细文件)
我想要的是对html我在我的仓库中创建的特定文件的Web访问(就像我的仓库index.html中名为'www'的文件夹中有文件一样).我想要一些我可以在浏览器中键入的URL,它会向我显示index.html内容.我可以设置这些html文件的Web访问权限吗?
截至目前,Gitlab不支持此功能.有一个功能要求:http://feedback.gitlab.com/forums/176466-general/suggestions/5599145-preview-render-static-html-pages-pushed-to-repos
目前,如果您查询Gitlab的原始html文件,它会设置某些HTTP标头,使其呈现为text/plain而不是:
$ curl -I http://my-gitlab/user/project/raw/dev/doc/_book/index.html
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 20 Apr 2015 13:17:48 GMT
Content-Type: text/plain; charset=utf-8
Connection: keep-alive
Status: 200 OK
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-UA-Compatible: IE=edge
Content-Disposition: inline; filename="index.html"
Content-Transfer-Encoding: binary
Cache-Control: private
ETag: "b81191c550c47eae1ab4adf72dfd0c92"
Set-Cookie: request_method=HEAD; path=/
X-Request-Id: 04ae0499-2fdf-4f89-82ab-8392a8d6a076
X-Runtime: 0.019857
Run Code Online (Sandbox Code Playgroud)