git - 从本地计算机在远程服务器上创建git repo

标签 git ssh remote-access

我有一个包含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 or SSH into the git user.
If you create a script named help, 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/

相关文章:

python - 有没有办法在 python 中对不是你当前的操作系统使用 os.path 操作?

mysql - 使用远程主机检查 Mysql - Icinga2

iphone - 使用 Xcode 进行 git fetch

python - 如何设置 sshuttle?

ssh - 如何使用 Putty (ssh) 将文件上传到服务器

linux - 如何将 linux 用户限制为 SSH 的绝对最小命令

c# - sql server 是否限制连接到它的 IP 数量?

python - 在 Python 中的 msysgit 上询问用户名时获取输出(在 Windows 上)

git - 如何从历史记录中删除已发布的 Git 提交?

git2go 获取远程标签