【问题标题】:prevent users on the server from viewing anything in the git repository阻止服务器上的用户查看 git 存储库中的任何内容
【发布时间】:2021-05-02 07:56:15
【问题描述】:

我安装了一个 gitea git 服务器。 如何防止在 linux 服务器上执行 cli 中的命令:git push、git pull、git clone 和其他允许用户查看存储库及其内容(存储库分支等)的命令?

因此,我想禁止服务器上的用户通过 Linux 服务器查看 git 中的任何内容(然后他们将只能通过 gitea 的 Web 界面查看存储库)

【问题讨论】:

  • 这不是编程问题,而是服务器问题。考虑在 superuser.com 上提问?
  • 我会试试的,谢谢!

标签: git gitea


【解决方案1】:

在服务器上,您可以像这样限制指定用户对 git 的访问:

sudo setfacl -m u:john:--- /usr/bin/git

【讨论】:

    猜你喜欢
    • 2013-03-19
    • 2011-05-19
    • 2014-10-18
    • 2011-07-05
    • 1970-01-01
    • 2021-07-28
    • 1970-01-01
    • 2016-12-16
    • 1970-01-01
    相关资源
    最近更新 更多