git-shell default working directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm working on standing up a self-hosted git server. I'd like to keep my repositories under a dedicated directory, i.e. /srv/git, but I'd also like to be able to clone a repository using a simple syntax:

    git clone git@myserver:repo.git

as opposed to

    git clone git@myserver:/srv/git/repo.git

I've not yet found a way to get this to work without keeping the repositories in the git user's home folder. I've tried using a ~/.ssh/rc file to chdir into /srv/git and I've tried using the `command=` parameter in the authorized_keys file; however, both of these fail because `cd` is not recognized as a valid command by git-shell.

I suppose I could create symlinks from the repositories in /srv/git into /home/git, but I'm wondering if there's a cleaner way to do this?

Thanks,

Greg



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux