diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-23 17:31:21 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-23 17:31:21 +0200 |
commit | e65dc35e2e4ec2f6c88bdba6067d22d7f3de3ffd (patch) | |
tree | 2b6c8980a3a361118c209f54c1db3976bf09272e | |
parent | f697b300cc0b421b196193c090df54a121b1d398 (diff) |
Add instructions on how to setup locked down git account
-rw-r--r-- | cheatsheet.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cheatsheet.txt b/cheatsheet.txt index bcb5e4c..bee3cf9 100644 --- a/cheatsheet.txt +++ b/cheatsheet.txt @@ -41,6 +41,18 @@ Setup remote repository 3. # blow the local project and do clone git clone scm.codesynthesis.com:/var/scm/proj/proj.git [name] +Setup severe git account (replace USER) + +# adduser --disabled-password --shell /usr/bin/git-shell USER +# usermod -a -G scm USER +# su -l -s /bin/bash USER +$ mkdir .ssh +$ mv /tmp/id_rsa.pub .ssh/authorized_keys +$ chown -R USER:USER .ssh +$ chmod 700 .ssh +$ chmod 600 .ssh/authorized_keys + + Delete a branch from a remote repository git push origin :experimental |