From 9f97de115b1144cbe10be58b3c0696c0ffeb6d85 Mon Sep 17 00:00:00 2001 From: didericis Date: Mon, 22 Jun 2026 13:21:11 -0400 Subject: [PATCH] fix(git-gate): skip host key-file check for gitea-provider repos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _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 '': "). Gate the host-file check on the static provider; gitea entries have nothing to verify here. Co-Authored-By: Claude Opus 4.8 --- bot_bottle/backend/__init__.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bot_bottle/backend/__init__.py b/bot_bottle/backend/__init__.py index e56621b..cd77097 100644 --- a/bot_bottle/backend/__init__.py +++ b/bot_bottle/backend/__init__.py @@ -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}")