From 047db5ba55be0dc0a12884f4be42efe606e4cc0c Mon Sep 17 00:00:00 2001 From: Andy Beverley Date: Sun, 17 Jul 2022 20:37:12 +0100 Subject: [PATCH 1/2] Only set GIT_ASKPASS if GITHUB_TOKEN is set --- bin/github-backup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/github-backup b/bin/github-backup index 85289f8..d89c3d3 100755 --- a/bin/github-backup +++ b/bin/github-backup @@ -78,7 +78,8 @@ EOF # command simply echos the GITHUB_TOKEN value, which can be used in place of a # password for authentication, thus allowing access to the private repos. This # option is ignored if it doesn't exist or returns nothing. -$ENV{GIT_ASKPASS}="github_backup_pass"; +$ENV{GIT_ASKPASS}="github_backup_pass" + if $ENV{GITHUB_TOKEN}; my $gh = Github::Backup->new( api_user => $opts{user}, From 2c9638c102d05c4f6c66c123a871ca3134abfcb1 Mon Sep 17 00:00:00 2001 From: Andy Beverley Date: Tue, 8 Nov 2022 18:13:49 +0000 Subject: [PATCH 2/2] Update github-backup-pass file name to match github-backup --- bin/github-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/github-backup b/bin/github-backup index d89c3d3..8ad3393 100755 --- a/bin/github-backup +++ b/bin/github-backup @@ -78,7 +78,7 @@ EOF # command simply echos the GITHUB_TOKEN value, which can be used in place of a # password for authentication, thus allowing access to the private repos. This # option is ignored if it doesn't exist or returns nothing. -$ENV{GIT_ASKPASS}="github_backup_pass" +$ENV{GIT_ASKPASS}="github-backup-pass" if $ENV{GITHUB_TOKEN}; my $gh = Github::Backup->new(