| Crates.io | git-shell-enforce-directory |
| lib.rs | git-shell-enforce-directory |
| version | 1.0.1 |
| created_at | 2018-03-29 07:17:13.281232+00 |
| updated_at | 2022-06-14 12:47:05.417857+00 |
| description | Restrict git-shell into a directory |
| homepage | https://github.com/simmel/git-shell-enforce-directory |
| repository | https://github.com/simmel/git-shell-enforce-directory |
| max_upload_size | |
| id | 58037 |
| size | 15,936 |
Restrict an ssh-key via force-command to a specific git repository.
Inspired by http://eagain.net/blog/2007/03/22/howto-host-git.html
$ cargo install git-shell-enforce-directory
$ cat >> ~/.ssh/authorized_keys <<EOF
command="$HOME/.cargo/bin/git-shell-enforce-directory $PATH_TO_GIT_REPO",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-[...] AAAA[...]
EOF
-v enables debug levelfatal! macro which does error! and then exits--read-only flag