Fetching Using --branch Gives Tag Error

Open
#25 2 comments 0 reactions 0 assignees View on GitHub

@EnesKartal is already working on this.

Since Nov 10, 2026.

  • #135 by @EnesKartal — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
git, github, go
Domain
cli

Research direction

Reproduce the issue with fetch_linux_amd64 using the reported --repo and --branch commands, then compare the --branch and --tag paths. Trace the --branch option and the latest-tag/version error; done means fetching the requested branch succeeds without rejecting an unrelated malformed tag.

Written by the indexing model from the issue text.

Description

bug

Using fetch_linux_amd64 to fetch a copy of my repo by branch name using OAuth token. So the command I am using is the below:

./fetch_linux_amd64 --repo="https://github.com/AAA/REPO_A" --branch="master" ./LOCAL_REPO_A

The error that it's returning is:
ERROR: Error occurred while computing latest tag that satisfies version contraint expression: -1 - Malformed version: testing_fix-multi-netif-ctrl-tab_07_06

"testing_fix-multi-netif-ctrl-tab_07_06" in the error is a pre-release tag that I had created on the repo. I am confused as to why it's even computing/checking tag names because I want to fetch the repo by branch name and had specified using --branch option. When I tried other branch names besides master I got the same error.

Then I tried the original command and substituted --branch with --tag, see below:
./fetch_linux_amd64 --repo="https://github.com/AAA/REPO_A" --tag="master" ./LOCAL_REPO_A

It seems that the new command was able to fetch the master branch of my repo. I am confused as to why the --tag would work but --branch didn't work. This seems like a bug.

Dominant language
Go
Stars
625
Forks
92
Avg merge
12h 56m
Merged PRs (30d)
2

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from gruntwork-io/fetch

All issues in gruntwork-io/fetch

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.