mirror of
https://github.com/moghtech/komodo.git
synced 2025-12-05 19:17:36 -06:00
"Set Git Remote" doesn't work with custom run directory #641
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pe1uca on GitHub (Oct 24, 2025).
My stack is sourced from a git repo.
I have a problem making a change to the files via the UI.
When "Write Stack Contents" runs, the step "Set Git Remote" has this output
cd /repo-cache/<git provider>/<repo>/main/latest && git remote set-url origin https://token:<TOKEN>@<git provider>/<repo>In the later git steps it keeps this directory inside
repo-cache.When it writes the new files it properly does it to the configured run directory: "Write File"
File written to "/<run directory>/docker-compose.yml"Then the last step is "Add Files" which tries to run
cd /repo-cache/<git provider>/<repo>/main/latest && git add /<run directory>/docker-compose.ymlwhich fails with the errorfatal: /<run directory>/docker-compose.yml: '/<run directory>/docker-compose.yml' is outside repository at '/repo-cache/<git provider>/<repo>/main/latest'Similarly, on "Deploy Stack", this step is
cd /etc/komodo/repos/<repo> && git remote set-url origin https://token:<TOKEN>@<git provider>/<repo>Then the next steps keep the directory inside
komodo/repos.The last step is "Compose Up", which runs
cd <run directory> && docker compose -p <stack> -f docker-compose.yml up -dIn this case the step succeeds since I'm importing an existing deployment, but the files are never updated from git.
If I clone the files from the repo configuration the correct custom clone path is used.
So, for "Clone Repo", the first step ("Clone Repo") is
git clone https://token:<TOKEN>@<git provider>/<repo> <clone path> -b mainAnd the step "Latest Commit" also properly uses it
cd <clone path> && git rev-parse --short HEAD && git rev-parse HEAD && git log -1 --pretty=%B