This is on RHEL 5
ssh-authkeys does exist and here are the first few lines
#!/usr/bin/perl
use strict;
use warnings;
use File::Temp qw(tempfile);
use lib $ENV{GL_LIBDIR};
use Gitolite::Rc;
use Gitolite::Common;
$|++;
# can be called directly, or as a post-update hook. Since it ignores
# arguments anyway, it hardly matters.
tsh_try("sestatus");
my $selinux = ( tsh_text() =~ /enabled/ );
my $ab = $rc{GL_ADMIN_BASE};
trace( 2, "'keydir' not found in '$ab'; exiting" ), exit if not -d "$ab/keydir";
my $akdir = "$ENV{HOME}/.ssh";
my $akfile = "$ENV{HOME}/.ssh/authorized_keys";
my $glshell = $rc{GL_BINDIR} . "/gitolite-shell";
my $auth_options = auth_options();
sanity();
# ----------------------------------------------------------------------
_chdir($ab);
# old data
my $old_ak = slurp($akfile);
my @non_gl = grep { not /^# gito.*start/ .. /^# gito.*end/ } slurp($akfile);
chomp(@non_gl);
my %seen = map { $_ => 'a non-gitolite key' } ( fp(@non_gl) );
![]()
------------------------------------------------------------------------------------------------------------------------------------
My line 120 is same as in github
![]()
117 # run system(), catch errors. Be verbose only if $ENV{D} exists. If not,
118 # exit with <rc of system()> if it applies, else just "exit 1".
119 trace( 1, 'system', @_ );
120 if ( system(@_) != 0 ) {
121 trace( 1, "system() failed", @_, "-> $?" );
122 if ( $? == -1 ) {
123 die "failed to execute: $!\n" if $ENV{D};
124 } elsif ( $? & 127 ) {
125 die "child died with signal " . ( $? & 127 ) . "\n" if $ENV{D};
126 } else {
127 die "child exited with value " . ( $? >> 8 ) . "\n" if $ENV{D};
128 exit( $? >> 8 );
129 }
130 exit 1;
131 }
Thanks,
Prasanna