From 211dcccbf3093a53263f8db3dc892545b69daaf0 Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Tue, 4 Aug 2026 20:07:13 +0200 Subject: [PATCH] Trim whitespace from the forge token before use A trailing newline pasted into the Woodpecker secret broke the push URL ("credential url cannot be parsed"); strip all whitespace from the token in both the mirror and the gem-publish steps. Co-Authored-By: Claude Fable 5 --- .woodpecker.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 7c36426..3e383cc 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -30,7 +30,9 @@ steps: commands: - apk add --no-cache git-subtree - git subtree split --prefix=libs/ruby/warp_engine HEAD -b warp-engine-split - - git push --force "https://ci:$${FORGE_TOKEN}@git.teletypegames.org/tools/warp_engine.git" warp-engine-split:master + # a secretbe másolt token végén lehet sortörés — levágjuk + - TOKEN="$$(printf '%s' "$${FORGE_TOKEN}" | tr -d '[:space:]')" + - git push --force "https://ci:$${TOKEN}@git.teletypegames.org/tools/warp_engine.git" warp-engine-split:master when: - event: push branch: master @@ -45,8 +47,9 @@ steps: - cd libs/ruby/warp_engine - gem build warp_engine.gemspec - mkdir -p ~/.gem + - TOKEN="$$(printf '%s' "$${FORGE_TOKEN}" | tr -d '[:space:]')" - | - printf -- '---\n:https://git.teletypegames.org/api/packages/tools/rubygems: Bearer %s\n' "$${FORGE_TOKEN}" > ~/.gem/credentials + printf -- '---\n:https://git.teletypegames.org/api/packages/tools/rubygems: Bearer %s\n' "$${TOKEN}" > ~/.gem/credentials - chmod 600 ~/.gem/credentials - gem push --host https://git.teletypegames.org/api/packages/tools/rubygems warp_engine-*.gem when: