Skip to content

Commit

Permalink
document @shell feature, allow "info" for all,
Browse files Browse the repository at this point in the history
...but still distinguish shell folks with a small extra line telling
them they have shell access
  • Loading branch information
Sitaram Chamarty committed Dec 23, 2009
1 parent 9c3abb2 commit b0ce84d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
16 changes: 16 additions & 0 deletions conf/example.conf
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,19 @@ repo gitolite
# This does either a plain "git config section.key value" (for the first 3
# examples above) or "git config --unset-all section.key" (for the last
# example). Other forms (--add, the value_regex, etc) are not supported.

# SHELL ACCESS
# ------------

# It is possible to give certain users shell access as well as allow them to
# use gitolite features for their git repo access. The idea is to eliminate
# the need for 2 keys when both shell and gitolite access are needed.

# To give a user shell access, add the username to the special @SHELL group:

@SHELL = sitaram

# Do not add people to this group indiscriminately. AUDITABILITY OF ACCESS
# CONTROL CHANGES (AND OF REPO ACCESSES) WILL BE COMPROMISED IF ADMINS CAN
# FIDDLE WITH THE ACTUAL (PLAIN TEXT) LOG FILES THAT GITOLITE KEEPS, WHICH
# THEY CAN EASILY DO IF THEY HAVE A SHELL.
15 changes: 15 additions & 0 deletions doc/6-ssh-troubleshooting.mkd
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# ssh troubleshooting

Update 2009-12-23: most of this document is now of historical interest and
will be totally revamped when I have time. For now, just note this amendment.

The document below says "we can't use the same key for both [gitolite access
and shell access]...". We've managed (thanks to an idea from Jesse Keating)
to get around this. Now it *is* possible for a single key to allow both
gitolite access *and* shell access.

This is done by placing such a user in a special `@SHELL` group in the
gitolite config file. As usual, please see `conf/example.conf` for more info
on this, since I'm using that as a central place to document anything
concerned with the conf file.

----

Ssh has always been the biggest troublespot in all this. While gitolite makes
it as easy as possible, you might still run into trouble sometimes.

Expand Down
3 changes: 2 additions & 1 deletion src/gl-auth-command
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ unless ($ENV{SSH_ORIGINAL_COMMAND}) {

my $cmd = $ENV{SSH_ORIGINAL_COMMAND};
# people allowed to get a shell can get basic access info by asking nicely
if ($shell_allowed and $cmd eq 'info') {
if ($cmd eq 'info') {
&report_basic($GL_ADMINDIR, $GL_CONF_COMPILED, $user);
print "you also have shell access\n\r" if $shell_allowed;
exit 1;
}

Expand Down

0 comments on commit b0ce84d

Please sign in to comment.