HEX
Server: Apache
System: Linux br1102.hostgator.com.br 5.14.0-687.17.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 22 07:21:26 EDT 2026 x86_64
User: rkcent87 (3754)
PHP: 8.3.32
Disabled: NONE
Upload Files
File: //usr/share/doc/perl-Net-OpenSSH/examples/git_with_password.pl
#!/usr/bin/perl

use strict;
use warnings;

use Net::OpenSSH;

@ARGV or die <<EOU;
Usage:
  $0 <ssh_target> <git_command> [<arg1> [<arg2> [...]]]

For instance:
  $0 kkabuto:sayaka\@mazingerz.pplab.or.jp clone ssh://kkabuto\@mazingerz.pplab.or.jp/home/kkabuto/pilder-linux

EOU

my $target = shift @ARGV; # password:user@host

my $ssh = Net::OpenSSH->new($target);
$ssh->die_on_error("Unable to connect to $target");

$ENV{GIT_SSH} = 'git_ssh_through_mux.pl';
$ENV{SSH_MUX} = $ssh->get_ctl_path;

system 'env';

system git => @ARGV;