diff --git a/doc/2-admin.mkd b/doc/2-admin.mkd index ae65b72..028b23a 100644 --- a/doc/2-admin.mkd +++ b/doc/2-admin.mkd @@ -29,7 +29,9 @@ familiar with ssh and authkeys etc. If so, please read up at least [this](http://sitaramc.github.com/0-installing/9-gitolite-basics.html#IMPORTANT_overview_of_ssh), and preferably also the man pages for sshd and sshd\_config, to make - sure you understand the security implications of what you are doing + sure you understand the security implications of what you are doing. + Once you have understood that, create at least an empty + `~/.ssh/authorized_keys` file before proceeding to the next step * cd to `$GL_ADMINDIR` and run `src/gl-compile-conf` diff --git a/src/gl-compile-conf b/src/gl-compile-conf index fd18f20..69bbb75 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -46,7 +46,7 @@ our ($GL_ADMINDIR, $GL_CONF, $GL_KEYDIR, $GL_CONF_COMPILED, $REPO_BASE); # now that this thing *may* be run via "push to admin", any errors have to # grab the admin's ATTENTION so he won't miss them among the other messages a # typical push generates -my $ATTN = "\n\t\t***** ERROR ***** "; +my $ATTN = "\n\t\t***** ERROR *****\n "; my $glrc = $ENV{HOME} . "/.gitolite.rc"; die "$ATTN parse $glrc failed: " . ($! or $@) unless do $glrc; @@ -75,7 +75,8 @@ sub wrap_chdir { } sub wrap_open { - open (my $fh, $_[0], $_[1]) or die "$ATTN open $_[1] failed: $! at ", (caller)[1], " line ", (caller)[2], "\n"; + open (my $fh, $_[0], $_[1]) or die "$ATTN open $_[1] failed: $! at ", (caller)[1], " line ", (caller)[2], "\n" . + ( $_[2] || '' ); # suffix custom error message if given return $fh; } @@ -203,7 +204,9 @@ for my $repo (keys %repos) # "compile" ssh authorized_keys # ---------------------------------------------------------------------------- -my $authkeys_fh = wrap_open( "<", $ENV{HOME} . "/.ssh/authorized_keys" ); +my $authkeys_fh = wrap_open( "<", $ENV{HOME} . "/.ssh/authorized_keys", + "\tFor security reasons, gitolite will not *create* this file if it does\n" . + "\tnot already exist. Please see the \"admin\" document for details\n"); my $newkeys_fh = wrap_open( ">", $ENV{HOME} . "/.ssh/new_authkeys" ); # save existing authkeys minus the GL-added stuff while (<$authkeys_fh>)