#13288·portainer

[BUG] Incorrect warning "The git reference could not be found..." when compose file is in a subdirectory

Author: andreapazzoCreated Sep 10, 2026Updated Sep 17, 2026
Labelskind/bugbug/need-confirmationbot/triage-complete

Before you start please confirm the following.

  • Yes, I've searched similar issues on GitHub.
  • Yes, I've checked whether this issue is covered in the Portainer documentation.

Problem Description

When creating/deploying a stack from a Git repository where the compose file is located inside a subdirectory rather than the repository root, Portainer displays a warning message stating:

"The git reference  could not be found on the remote repository."

Despite this warning, the repository clone succeeds, the compose file is correctly read from the subfolder, and the stack starts/deploys without any issues.

Expected Behavior

No warning should be displayed, as the Git reference and the compose path are both valid.

Actual Behavior

A false-positive warning "The git reference could not be found on the remote repository." is thrown, even though the stack builds and runs as intended.

Steps to Reproduce

  1. Go to Stacks > Add stack.
  2. Select Repository as the build method.
  3. Provide the repository URL and reference (e.g., branch main).
  4. Set the Compose path to a file located in a subdirectory (e.g., subfolder/docker-compose.yml).
  5. Click Deploy the stack.
  6. Observe the warning banner appearing at the top/bottom of the UI while the stack actually deploys successfully.

Portainer logs or screenshots

Image

Portainer version

2.45.0

Portainer Edition

Community Edition (CE)

Platform and Version

Docker

OS and Architecture

arm64

Browser

No response

What command did you use to deploy Portainer?

bash

Additional Information

No response