Skip to content

Commit 9c7fed2

Browse files
author
Andrey Cheptsov
committed
Use public GitPython API for templates repo access check.
Switch `git.cmd.Git` to `git.Git` so pyright accepts the access while preserving the same runtime behavior for `ls_remote` validation. Made-with: Cursor
1 parent c9937c6 commit 9c7fed2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dstack/_internal/server/services/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _repo_key(project_id: uuid.UUID, repo_url: str) -> str:
107107

108108
def validate_templates_repo_access(repo_url: str) -> None:
109109
try:
110-
git.cmd.Git().ls_remote("--exit-code", repo_url, "HEAD")
110+
git.Git().ls_remote("--exit-code", repo_url, "HEAD")
111111
except git.GitCommandError:
112112
raise ValueError(f"Cannot access templates repo: {repo_url}")
113113

0 commit comments

Comments
 (0)