/usr/share/perl5/Git/PurePerl/Protocol/SSH.pm is in libgit-pure-perl 0.48-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | package Git::PurePerl::Protocol::SSH;
use Moose;
use MooseX::StrictConstructor;
use Moose::Util::TypeConstraints;
use IPC::Open2;
use namespace::autoclean;
extends 'Git::PurePerl::Protocol';
has 'hostname' => ( is => 'ro', isa => 'Str', required => 1 );
has 'username' => ( is => 'ro', isa => 'Str', required => 0 );
has 'path' => ( is => 'ro', isa => 'Str', required => 1 );
sub connect_socket {
my $self = shift;
my ($read, $write);
my $connect = join('@', grep {defined} $self->username, $self->hostname);
my $pid = open2(
$read, $write,
"ssh", $connect,
"-o", "BatchMode yes",
"git-upload-pack", $self->path,
);
$read->autoflush(1);
$write->autoflush(1);
$self->read_socket($read);
$self->write_socket($write);
}
1;
|