dagger/dagger · error
list tags for %s: %w
Error message
list tags for %s: %w
What it means
Same call path as the branches error: loadWorkspaceRemoteRows wraps dag.Git(ref).Tags(ctx) failures as "list tags for %s: %w". It is thrown when listing tags from the remote git service fails even if branches listed fine.
Source
Thrown at internal/cmd/dagger/workspace.go:1149
return subdir
}
type workspaceRemoteRow struct {
Kind string
Address string
Autocheck string
Checks string
}
func loadWorkspaceRemoteRows(ctx context.Context, dag *dagger.Client, remote workspaceRemoteAddress) ([]*workspaceRemoteRow, error) {
repo := dag.Git(remote.CloneRef)
branches, err := repo.Branches(ctx)
if err != nil {
return nil, fmt.Errorf("list branches for %s: %w", remote.CloneRef, err)
}
tags, err := repo.Tags(ctx)
if err != nil {
return nil, fmt.Errorf("list tags for %s: %w", remote.CloneRef, err)
}
sort.Strings(branches)
sort.Strings(tags)
rows := make([]*workspaceRemoteRow, 0, len(branches)+len(tags)+1)
seen := map[string]struct{}{}
add := func(kind, version string) {
if version == "" {
return
}
address := gitref.RefString(remote.CloneRef, remote.Path, version)
if _, ok := seen[address]; ok {
return
}
seen[address] = struct{}{}
rows = append(rows, &workspaceRemoteRow{
Kind: kind,View on GitHub (pinned to 82ba2681db)
Solutions
- Re-run the command — tags listing is often transient (rate limits, network)
- Confirm repo access/credentials as with the branches error
- Check git host status/limits if errors repeat
- Verify the CloneRef points at an existing repository
Example fix
// retry pattern
for i := 0; i < 3; i++ {
tags, err := repo.Tags(ctx)
if err == nil { break }
time.Sleep(time.Second << i)
} Defensive patterns
Strategy: retry
Validate before calling
if !isHTTPSGitURL(remote.CloneRef) {
return errors.New("CloneRef must be an https git URL")
} Type guard
func remoteReachable(ctx context.Context, dag *dagger.Client, ref string) bool {
_, err := dag.Git(ref).Branches(ctx)
return err == nil
} Try / catch
rows, err := loadWorkspaceRemoteRows(ctx, dag, remote)
var retryable = strings.Contains(err.Error(), "list tags") || strings.Contains(err.Error(), "list branches")
if retryable {
rows, err = loadWorkspaceRemoteRows(ctx, dag, remote) // transient host failures are common
} Prevention
- Expect git-host rate limits; back off and retry tag/branch listings
- Verify repo access before listing operations
- Monitor git-host status pages for outages
When it happens
Trigger: Transient API failure on the second call, repo inaccessible to the service, or the host refusing the tags query for the given CloneRef.
Common situations: Rate limiting by the git host; flaky network between engine and host; private repo auth partially configured; repos with unusual tag permissions.
Related errors
- list branches for %s: %w
- resolve git remote HEAD: %w
- resolve latest git release %q: %w
- failed to checkout remote %s: %w
- failed to fetch ref %d: %w
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/1181608c0611cd5f.
Report an issue: GitHub.