fix(git-gate): skip host key-file check for gitea-provider repos
lint / lint (push) Successful in 1m39s
test / unit (pull_request) Successful in 34s
test / integration (pull_request) Successful in 18s

_validate_git_entries was written for static keys (PRD 0008) and ran
os.path.isfile() on every entry's IdentityFile. gitea-provider repos
(PRD 0047/0048) create their deploy key at provision time, so
IdentityFile is empty at parse — tripping the check with an empty path
("git upstream key file not found for '<name>': "). Gate the host-file
check on the static provider; gitea entries have nothing to verify here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 13:21:11 -04:00
parent 8f21f4df19
commit 9f97de115b
+10 -4
View File
@@ -381,11 +381,17 @@ class BottleBackend(ABC, Generic[PlanT, CleanupT]):
)
def _validate_git_entries(self, entries: Sequence[ManifestGitEntry]) -> None:
"""Each entry's IdentityFile must exist on the host (after
expanding leading ~) — the git-gate copies it in at start time
to authenticate the upstream push (PRD 0008). Shape is already
enforced by Manifest validation; this only checks presence."""
"""Each `static`-provider entry's IdentityFile must exist on the
host (after expanding leading ~) — the git-gate copies it in at
start time to authenticate the upstream push (PRD 0008). Shape is
already enforced by Manifest validation; this only checks presence.
`gitea`-provider entries (PRD 0047/0048) carry no host key:
IdentityFile is empty at parse time and the deploy key is created
at provision time, so there is nothing to check here."""
for entry in entries:
if entry.Key.provider != "static":
continue
key = expand_tilde(entry.IdentityFile)
if not os.path.isfile(key):
die(f"git upstream key file not found for '{entry.Name}': {key}")