git-shell-enforce-directory

Crates.iogit-shell-enforce-directory
lib.rsgit-shell-enforce-directory
version1.0.1
sourcesrc
created_at2018-03-29 07:17:13.281232
updated_at2022-06-14 12:47:05.417857
descriptionRestrict git-shell into a directory
homepagehttps://github.com/simmel/git-shell-enforce-directory
repositoryhttps://github.com/simmel/git-shell-enforce-directory
max_upload_size
id58037
size15,936
Simon Lundström (simmel)

documentation

https://docs.rs/git-shell-enforce-directory/

README

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

Usage

  1. Install
$ cargo install git-shell-enforce-directory
  1. Modify and run:
$ 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

TODO

  • Use logging
    • -v enables debug level
    • Create fatal! macro which does error! and then exits
  • Add --read-only flag
  • Add tests
  • Fix the more Cargo.toml metadata documentation path e.g.
Commit count: 46

cargo fmt