fix(ci): separate git credentials from --git-repo URL to fix tea pr create #40

Merged
kacerr merged 1 commits from fix/gitops-tea-url into main 2026-06-12 19:39:31 +02:00
Owner

Problem

uh-cli was passing the full authenticated URL (https://kacerr:TOKEN@gitea.../kacerr/home-kubernetes) to --git-repo. When tea pr create runs inside the cloned workdir it tries to auto-detect the owner/repo by matching the git remote URL against configured logins. The embedded user:token@ in the host breaks that match, so tea can't extract the path and errors with path segment [0] is empty.

Fix

  • Split credentials out of the URL: store them via git config credential.helper store + ~/.git-credentials
  • Pass a clean URL (https://gitea.home.hrajfrisbee.cz/kacerr/home-kubernetes) to --git-repo
  • Tea now sees a plain https://gitea.home.hrajfrisbee.cz/... remote that correctly matches the configured login and resolves kacerr/home-kubernetes

Also adds set -x to the PR step for shell-level tracing in CI logs.

## Problem `uh-cli` was passing the full authenticated URL (`https://kacerr:TOKEN@gitea.../kacerr/home-kubernetes`) to `--git-repo`. When `tea pr create` runs inside the cloned workdir it tries to auto-detect the owner/repo by matching the git remote URL against configured logins. The embedded `user:token@` in the host breaks that match, so tea can't extract the path and errors with `path segment [0] is empty`. ## Fix - Split credentials out of the URL: store them via `git config credential.helper store` + `~/.git-credentials` - Pass a clean URL (`https://gitea.home.hrajfrisbee.cz/kacerr/home-kubernetes`) to `--git-repo` - Tea now sees a plain `https://gitea.home.hrajfrisbee.cz/...` remote that correctly matches the configured login and resolves `kacerr/home-kubernetes` Also adds `set -x` to the PR step for shell-level tracing in CI logs.
kacerr added 1 commit 2026-06-12 19:37:39 +02:00
fix(ci): separate git credentials from --git-repo URL to fix tea pr create
All checks were successful
Deploy to K8s / deploy (push) Successful in 12s
ad127d36ea
tea pr create matches the remote URL against the configured login URL to
auto-detect owner/repo. Embedding credentials in the URL (user:token@host)
breaks that match and produces "path segment [0] is empty". Store creds
via git credential helper instead and pass a clean URL to uh-cli.

Also adds set -x to the PR step for shell-level tracing in CI logs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kacerr merged commit af030c8255 into main 2026-06-12 19:39:31 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kacerr/fuj-management#40