Git-Server
view release on metacpan or search on metacpan
splice @invoked, --$i, ($2?1:2) if $invoked[$i-1] =~ /^(-C|--chdir)\b(=?).*$/;
}
}
$cwd = getcwd();
}
if (@$identities) {
# Sanity check to verify identity files are ready to go, and expand relative paths if needed.
my $verified_identities = [];
my $public_key_file = {};
my $private_key_file = {};
foreach my $ident (@$identities) {
if (my @found = agentkeys($ident)) {
foreach (@found) {
push @$verified_identities, $_ if !$public_key_file->{$_}++;
}
}
elsif (-e $ident && -r _ && -s _) {
my $pub = run_output_ignore_err "ssh-keygen", "-y", "-P", "", "-f", $ident;
if ($pub) {
warn localtime().": [$$] $Script: --identity '$ident': Using private key for: $pub";
push @$verified_identities, $ident if !$private_key_file->{$ident}++;
}
elsif ($ident =~ m{^(.+)\.pub$} and -r $1 and $ident = $1) {
redo; # Try again with the NON-".pub" file
}
else {
warn localtime().": [$$] $Script: --identity '$ident': Unable to read identity file. Passphrase required?\n";
}
}
else {
warn localtime().": [$$] $Script: --identity '$ident': Ignoring non-existent key\n";
( run in 0.966 second using v1.01-cache-2.11-cpan-39bf76dae61 )