From 813a0d73792ab4d936f0b0ff697ec191ad7f167d Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sun, 22 Feb 2026 22:28:49 +0000 Subject: [PATCH] Fix clone: add netrc auth + cleanup between retries --- .woodpecker/api.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.woodpecker/api.yml b/.woodpecker/api.yml index e281aa9..acf467a 100644 --- a/.woodpecker/api.yml +++ b/.woodpecker/api.yml @@ -7,7 +7,11 @@ clone: image: alpine commands: - "apk update && apk add git" - - "for i in 1 2 3 4 5; do git clone https://github.com/immovika/realestate-crawler.git . && break || echo \"Clone attempt $i failed, retrying in 10s...\" && sleep 10; done" + - "printf 'machine %s +login %s +password %s +' \"$CI_NETRC_MACHINE\" \"$CI_NETRC_USERNAME\" \"$CI_NETRC_PASSWORD\" > ~/.netrc && chmod 600 ~/.netrc" + - 'for i in 1 2 3 4 5; do git clone "$CI_REPO_CLONE_URL" . && break || echo "Clone attempt $i failed, retrying in 10s..." && rm -rf .git && sleep 10; done' - "git checkout $CI_COMMIT_SHA" steps: