From b410f600bbee2d9de4f9ded59ee6d0574f472faa Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 15 Jan 2026 02:24:54 -0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A7=20Update=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lilith_auto_commit_pipeline/stages/push.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/auto-commit-pipeline-py/src/lilith_auto_commit_pipeline/stages/push.py b/auto-commit-pipeline-py/src/lilith_auto_commit_pipeline/stages/push.py index 21d6850..fccd7fa 100644 --- a/auto-commit-pipeline-py/src/lilith_auto_commit_pipeline/stages/push.py +++ b/auto-commit-pipeline-py/src/lilith_auto_commit_pipeline/stages/push.py @@ -215,6 +215,22 @@ class PushCommitStage(PipelineStage): if "rejected" in error_msg or "non-fast-forward" in error_msg: raise PushRejectedError(f"Push rejected: {e.stderr}") + # Check if remote doesn't exist or branch doesn't match + if ("does not appear to be a git repository" in error_msg or + "could not read from remote repository" in error_msg or + "src refspec" in error_msg and "does not match any" in error_msg): + logger.warning(f"Remote not configured properly, attempting auto-setup") + if await self._setup_remote_if_missing(repo_path, remote, branch): + # Retry push after setup + result = subprocess.run( + ["git", "push", "-u", remote, branch], + cwd=repo_path, + capture_output=True, + text=True, + check=True, + ) + return # Success after setup + raise Exception(f"Push failed: {e.stderr}") async def _pull_rebase(