[GH-ISSUE #634] Cannot push a stack change to non-main branch with git repo #6216

Closed
opened 2026-04-24 19:20:04 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @Chuckame on GitHub (Jun 28, 2025).
Original GitHub issue: https://github.com/moghtech/komodo/issues/634

Issue

When having a stack from a git repository with a non main branch, it doesn't work.

Error message during push:

command

cd /etc/komodo/repos/<the repo name> && git push --set-upstream origin main

stderr

error: src refspec main does not match any
error: failed to push some refs to 'https://github.com/Chuckame/<the repo name>'

I've configured master but it still uses main

To reproduce

  • Create a repository and set a branch name to something else than main
  • create a stack from a git repository
  • Start the stack
  • Then make a change in the docker compose file
  • Then save -> Here it fails 💥
Originally created by @Chuckame on GitHub (Jun 28, 2025). Original GitHub issue: https://github.com/moghtech/komodo/issues/634 # Issue When having a stack from a git repository with a non `main` branch, it doesn't work. Error message during push: ``` command cd /etc/komodo/repos/<the repo name> && git push --set-upstream origin main stderr error: src refspec main does not match any error: failed to push some refs to 'https://github.com/Chuckame/<the repo name>' ``` I've configured `master` but it still uses `main` # To reproduce - Create a repository and set a branch name to something else than `main` - create a stack from a git repository - Start the stack - Then make a change in the docker compose file - Then save -> Here it fails 💥
GiteaMirror added the bug1.19.2 labels 2026-04-24 19:20:04 -05:00
Author
Owner

@Dlotan commented on GitHub (Jun 29, 2025):

did you try redeploy first? I had this problem and a workaround was to do a redeploy before being able to make changes from komodo

<!-- gh-comment-id:3016389240 --> @Dlotan commented on GitHub (Jun 29, 2025): did you try redeploy first? I had this problem and a workaround was to do a redeploy before being able to make changes from komodo
Author
Owner

@ridvan-cln commented on GitHub (Jul 13, 2025):

did you try redeploy first? I had this problem and a workaround was to do a redeploy before being able to make changes from komodo

Not OP but i have the same issue, redeploy does not fix it for me.

<!-- gh-comment-id:3067259706 --> @ridvan-cln commented on GitHub (Jul 13, 2025): > did you try redeploy first? I had this problem and a workaround was to do a redeploy before being able to make changes from komodo Not OP but i have the same issue, redeploy does not fix it for me.
Author
Owner

@hillbicks commented on GitHub (Aug 8, 2025):

Yes, same here. I cloned a github repo to my forgejo instance (branch master), added the repo in komodo and then added the stack. Go to info tab to make changes, for example change a port that is already used in another container. You can't deploy the stack because the deploy fails without being able to make the changes.

I think komodo should also take the branch from the repo config and not assume the branch name to be main.

<!-- gh-comment-id:3167301846 --> @hillbicks commented on GitHub (Aug 8, 2025): Yes, same here. I cloned a github repo to my forgejo instance (branch master), added the repo in komodo and then added the stack. Go to info tab to make changes, for example change a port that is already used in another container. You can't deploy the stack because the deploy fails without being able to make the changes. I think komodo should also take the branch from the repo config and not assume the branch name to be main.
Author
Owner

@mbecker20 commented on GitHub (Aug 29, 2025):

Tracked down the issue and the linked commit should fix it. It will be included in 1.19.2 (likely Sunday)

<!-- gh-comment-id:3236249256 --> @mbecker20 commented on GitHub (Aug 29, 2025): Tracked down the issue and the linked commit should fix it. It will be included in 1.19.2 (likely Sunday)
Author
Owner

@mbecker20 commented on GitHub (Sep 1, 2025):

Hi, v1.19.2 is now out and this issue should now be fixed for Stacks, Builds, and Resource Syncs which use Linked Repos.

<!-- gh-comment-id:3240718209 --> @mbecker20 commented on GitHub (Sep 1, 2025): Hi, v1.19.2 is now out and this issue should now be fixed for Stacks, Builds, and Resource Syncs which use Linked Repos.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#6216