I've got a little perl-script which attempts to pull from a git repository and then gets some things from git log:
use Git::Repository;
my $repo = Git::Repository->new(
git_dir => $git_path,
);
$repo->run('pull') || die $!;
my @commits = $repo->run(log);
...
For the authentication I have a .netrc
-file with my credentials in /home/bla
. This works perfectly when the script is run from the shell. Now I've tried to use this script for a web-application:
my $evil_commits = `./list_commits.pl`;
When I do this it yields the following error message:
[Thu Sep 19 12:50:49 2013] [error] [client <>] fatal: Could not read password: No such device or address at ./list_commits.pl line 45
I've already tried to set $ENV{HOME}
inside the CGI-script but that doesn't help. Any suggestions on what I'm missing here?