如果它也是 GIT 存储库,则从网络服务器提供服务目录
如果正确的安全考虑到位,是否有任何理由不提供包含生产代码的 GIT 存储库的目录。该目录是应用程序的 Webroot,但如果使用 Apache 拒绝访问 .git 文件,是否有任何理由不这样做?
If the correct security concerns are put in place, is there any reason to not serve a directory that contains a GIT repo of production code. The directory is a webroot of an application but if one uses say Apache to deny access to .git files would there be any reason to not do it this way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要无法访问 .git 文件夹或其中包含的任何文件,就不应该有任何问题。但你需要确保这是不可能的,否则你让人们访问你的完整存储库,他们可以简单地 git 克隆它。
As long as it's impossible to access the .git folder or any of the files contained with it there shouldn't be any issues. But you need to make sure that it's not possible, else you give people access to your full repo and they could simply git-clone it.