From 42e420ad0dacaa01e8f4f4d0e184c2cb80e6df35 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Thu, 9 Mar 2023 08:12:59 +0000 Subject: [PATCH] Disable prompts on password-protected repos --- codearchiver/modules/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codearchiver/modules/git.py b/codearchiver/modules/git.py index 578b47e..c647bfa 100644 --- a/codearchiver/modules/git.py +++ b/codearchiver/modules/git.py @@ -44,7 +44,7 @@ class Git(codearchiver.core.Module): raise FileExistsError(f'{bundle!r} already exists') logger.info(f'Cloning {self._url} into {directory}') - codearchiver.subprocess.run_with_log(['git', 'clone', '--verbose', '--mirror', self._url, directory]) + codearchiver.subprocess.run_with_log(['git', 'clone', '--verbose', '--mirror', self._url, directory], env = {**os.environ, 'GIT_TERMINAL_PROMPT': '0'}) if self._extraBranches: for branch, commit in self._extraBranches.items():