我有一个包含GIT信息库的Debian服务器。通过ssh登录时,许多用户只能使用“Git_Shell”。考虑到他们对尝试访问的目录具有写权限,这些用户是否有可能以某种方式在远程服务器上启动新存储库?
假设Bruno想要在他的/ home / bruno目录中创建一个新的存储库,当被限制为'git_shell'时,他将如何做?
最佳答案
如“Git shell not enabled?”中所述,“help
”应列出可用的命令。
这些仅限于用户目录 git-shell-commands
中的那些,您可以添加一个创建git repo的目录。
文章“Hosting an admin-friendly git server with git-shell”添加:
it turns out that if you create a directory with this name in the Git user's home directory, any executable files you place inside the directory will become accessible through an interactive shell when you
su
up orSSH
into the git user.
If you create a script namedhelp
, it will get executed when the shell starts.
Kind of cool, and really handy for making your Git server more friendly :-)
关于git - 从本地计算机在远程服务器上创建git repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28231881/