Cvs
view release on metacpan or search on metacpan
lib/Cvs/Cvsroot.pm view on Meta::CPAN
elsif($self->{method} eq 'ssh')
{
# without pty, ssh call the ssh-askpass program to grab needed
# informations from user. In batch mode it's not possible, so
# we rewrite an ssh-askpass in a shell script stored in a
# temporary file and we tell ssh to call it.
my($fh, $file) = File::Temp::tmpnam()
or die "can't create a temporary file";
print STDERR "Creating askpass script `$file'\n"
if $debug;
chmod(0700, $file);
$fh->print("#!/bin/sh\n");
$fh->print("echo \$1|grep -iq password&&echo $self->{password}&&exit\n");
$fh->print("echo \$1|grep -iq passphrase&&echo $self->{passphrase}&&exit\n");
$fh->print("echo yes\n");
$fh->close();
$cmd->push_cleanup(sub
{
print STDERR "Deleting askpass script `$file'\n"
if $debug;
unlink $file
( run in 0.966 second using v1.01-cache-2.11-cpan-496ff517765 )