From 3b0f3e7824d66504af66945e5c806a7cfb9711ba Mon Sep 17 00:00:00 2001 From: dsyoon Date: Tue, 17 Nov 2026 16:19:53 +0900 Subject: [PATCH] =?UTF-8?q?[=EB=B0=B1=EC=97=85]=20Gitea=20=EB=AF=B8?= =?UTF-8?q?=EB=9F=AC=20=EA=B0=B1=EC=8B=A0=20=EC=8B=9C=20git=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=EC=9D=B4=20=EA=B2=B0=EA=B3=BC=20JSON=EC=97=90=20?= =?UTF-8?q?=EC=84=9E=EC=97=AC=20=EC=8B=A4=ED=8C=A8=ED=95=98=EB=8D=98=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 미러가 이미 있으면 git remote update가 'Fetching origin'을 stdout에 출력해 결과 JSON 파싱이 실패했다(첫 실행 이후 매번 gitea 단계 실패). git 하위 프로세스의 stdout을 stderr로 돌린다. Co-Authored-By: Claude Opus 5.5 --- scripts/gitea-backup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gitea-backup.sh b/scripts/gitea-backup.sh index a056e98..c18c7ca 100755 --- a/scripts/gitea-backup.sh +++ b/scripts/gitea-backup.sh @@ -91,11 +91,11 @@ for repo in repos: env["GIT_TERMINAL_PROMPT"] = "0" if os.path.isdir(mirror_path): - subprocess.run(["git", "-C", mirror_path, "remote", "set-url", "origin", auth_url], check=True) - proc = subprocess.run(["git", "-C", mirror_path, "remote", "update", "--prune"], env=env) + subprocess.run(["git", "-C", mirror_path, "remote", "set-url", "origin", auth_url], check=True, stdout=sys.stderr) + proc = subprocess.run(["git", "-C", mirror_path, "remote", "update", "--prune"], env=env, stdout=sys.stderr) action = "updated" else: - proc = subprocess.run(["git", "clone", "--mirror", auth_url, mirror_path], env=env) + proc = subprocess.run(["git", "clone", "--mirror", auth_url, mirror_path], env=env, stdout=sys.stderr) action = "cloned" if proc.returncode == 0: