Skip to content

Commit d01d657

Browse files
committed
Bazel: accept new SSH keys in git_lfs_probe.py
1 parent 170e223 commit d01d657

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

misc/bazel/internal/git_lfs_probe.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from typing import Dict
2323
import argparse
2424

25+
2526
def options():
2627
p = argparse.ArgumentParser(description=__doc__)
2728
p.add_argument("--hash-only", action="store_true")
@@ -69,7 +70,12 @@ def get_endpoint():
6970
server, _, path = ssh_endpoint.partition(":")
7071
ssh_command = shutil.which(os.environ.get("GIT_SSH", os.environ.get("GIT_SSH_COMMAND", "ssh")))
7172
assert ssh_command, "no ssh command found"
72-
resp = json.loads(subprocess.check_output([ssh_command, server, "git-lfs-authenticate", path, "download"]))
73+
resp = json.loads(subprocess.check_output([ssh_command,
74+
"-oStrictHostKeyChecking=accept-new",
75+
server,
76+
"git-lfs-authenticate",
77+
path,
78+
"download"]))
7379
endpoint.href = resp.get("href", endpoint)
7480
endpoint.update_headers(resp.get("header", {}))
7581
url = urlparse(endpoint.href)

0 commit comments

Comments
 (0)