如果它也是 GIT 存储库,则从网络服务器提供服务目录

发布于 2024-09-10 02:50:55 字数 104 浏览 0 评论 0原文

如果正确的安全考虑到位,是否有任何理由不提供包含生产代码的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九局 2024-09-17 02:50:55

只要无法访问 .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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文