search

Home  >  Q&A  >  body text

GIT进行版本管理带来的安全问题

是这样的
比如我有个项目是demo 文件路径是 /var/www/html/demo/
使用git进行版本管理后,自动有了一个文件夹 /var/www/html/demo/.git

因为我的网站指向的就是 /var/www/html/demo 这个路径
自然的 可以在浏览器中访问 /var/www/html/demo/.git 下的文件
大家都知道这个文件夹下的文件名称是固定的 ,这样 别人就可以下载你的.git 下的文件

请问大家有什么好的解决方案吗?

世界只因有你世界只因有你2849 days ago614

reply all(3)I'll reply

  • 漂亮男人

    漂亮男人2017-05-02 09:23:52

    git hook automatic deployment

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-02 09:23:52

    , but for safety reasons, it is best to make the git directory the parent directory of the web root directory

    Okay, so easy

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:23:52

    Set url-mapping to map .git to 404?

    reply
    0
  • Cancelreply