Skip to content

Commit 09a8f32

Browse files
Ben DavisallRisc
authored andcommitted
Updated to ensure that the user isn't prompted for username and password when trying to check a git repo's remote refernces if they don't have access
1 parent b8af780 commit 09a8f32

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/fastsandpm/_git_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ def get_remote_refs(remote: str) -> dict[str, tuple[frozenset[str], frozenset[st
370370
["git", "ls-remote", remote],
371371
stderr=subprocess.STDOUT,
372372
stdout=subprocess.PIPE,
373+
env={"GIT_TERMINAL_PROMPT": "0", "GIT_ASKPASS": "0", **dict(os.environ)},
373374
)
374375

375376
if proc.returncode != 0:

0 commit comments

Comments
 (0)