From b08ff7ad835cff84a7fd18205c85842a3fbcce19 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Mon, 17 Nov 2025 13:50:17 +0000 Subject: [PATCH] fix: Simplify git clone to use token:@host format --- .gitea/workflows/build-and-deploy.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index 41e3667..948b5c0 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -200,24 +200,17 @@ jobs: mkdir -p "\$DEPLOY_DIR" cd "\$DEPLOY_DIR" - # Configure git credentials - echo "Configuring git credentials..." - git config --global credential.helper store - echo "https://\${GITEA_TOKEN}:x-oauth-basic@git.silverlabs.uk" > ~/.git-credentials - - # Clone or pull latest code + # Clone or pull latest code with token authentication if [ ! -d .git ]; then echo "Cloning repository with authentication..." rm -rf * # Clean any existing files - git clone https://git.silverlabs.uk/Jamie/littleshop.git . + # Use token as username, random string as password (Gitea format) + git clone https://\${GITEA_TOKEN}:@git.silverlabs.uk/Jamie/littleshop.git . else echo "Repository already cloned, pulling latest..." git fetch origin fi - # Clean up credentials - rm -f ~/.git-credentials - echo "Checking out version: \$VERSION" git checkout \$VERSION || git checkout main