Skip to content

Commit

Permalink
Bazel: accept new SSH keys in git_lfs_probe.py
Browse files Browse the repository at this point in the history
  • Loading branch information
redsun82 committed May 17, 2024
1 parent 170e223 commit d01d657
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion misc/bazel/internal/git_lfs_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from typing import Dict
import argparse


def options():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument("--hash-only", action="store_true")
Expand Down Expand Up @@ -69,7 +70,12 @@ def get_endpoint():
server, _, path = ssh_endpoint.partition(":")
ssh_command = shutil.which(os.environ.get("GIT_SSH", os.environ.get("GIT_SSH_COMMAND", "ssh")))
assert ssh_command, "no ssh command found"
resp = json.loads(subprocess.check_output([ssh_command, server, "git-lfs-authenticate", path, "download"]))
resp = json.loads(subprocess.check_output([ssh_command,
"-oStrictHostKeyChecking=accept-new",
server,
"git-lfs-authenticate",
path,
"download"]))
endpoint.href = resp.get("href", endpoint)
endpoint.update_headers(resp.get("header", {}))
url = urlparse(endpoint.href)
Expand Down

0 comments on commit d01d657

Please sign in to comment.