diff --git a/stack_orchestrator/deploy/webapp/util.py b/stack_orchestrator/deploy/webapp/util.py index b6d019aa..ef98117b 100644 --- a/stack_orchestrator/deploy/webapp/util.py +++ b/stack_orchestrator/deploy/webapp/util.py @@ -207,9 +207,11 @@ def build_container_image(app_record, tag, extra_build_args=[]): print(f"Cloning repository {repo} to {clone_dir} ...") if ref: # TODO: Determing branch or hash, and use depth 1 if we can. - result = subprocess.run(["git", "clone", repo, clone_dir]) - result.check_returncode() - subprocess.check_call(["git", "checkout", ref], cwd=clone_dir) + git_env = dict(os.environ.copy()) + # Never prompt + git_env["GIT_TERMINAL_PROMPT"] = "0" + subprocess.check_call(["git", "clone", repo, clone_dir], env=git_env) + subprocess.check_call(["git", "checkout", ref], cwd=clone_dir, env=git_env) else: result = subprocess.run(["git", "clone", "--depth", "1", repo, clone_dir]) result.check_returncode()