JanDeDobbeleer/oh-my-posh · error

failed to get %s release

Error message

failed to get %s release

What it means

`fetchFontAssets` requests the GitHub release metadata for a font repository (e.g. ryanoasis/nerd-fonts) and returns this error when the HTTP client errors or the response status is not 200. It collapses both transport failures and bad status codes into one message naming the repo, so GitHub API rate limits and outages both surface here.

Source

Thrown at src/cli/font/fonts.go:122

		URL:    assets[0].URL,
		Folder: "ttf/",
	}, nil
}

func fetchFontAssets(repo string) ([]*Asset, error) {
	ctx, cancelF := context.WithTimeout(context.Background(), time.Second*time.Duration(20))
	defer cancelF()

	repoURL := "https://api.github.com/repos/" + repo + "/releases/latest"
	req, err := httplib.NewRequestWithContext(ctx, "GET", repoURL, nil)
	if err != nil {
		return nil, err
	}

	req.Header.Add("Accept", "application/vnd.github.v3+json")
	response, err := http.HTTPClient.Do(req)
	if err != nil || response.StatusCode != httplib.StatusOK {
		return nil, fmt.Errorf("failed to get %s release", repo)
	}

	defer response.Body.Close()

	var release release
	err = json.NewDecoder(response.Body).Decode(&release)
	if err != nil {
		return nil, errors.New("failed to parse nerd fonts release")
	}

	var fonts []*Asset
	for _, asset := range release.Assets {
		if asset.State == "uploaded" && strings.HasSuffix(asset.Name, ".zip") {
			asset.Name = strings.TrimSuffix(asset.Name, ".zip")
			fonts = append(fonts, asset)
		}
	}

View on GitHub (pinned to 0976794618)

Solutions

  1. Wait for the GitHub rate limit to reset (check `curl -s https://api.github.com/rate_limit`) or authenticate via GH_TOKEN if applicable
  2. Retry after verifying network access to api.github.com
  3. Install the font manually: download the zip from the releases page and run `oh-my-posh font install <local>.zip`
  4. Check status.github.com for ongoing incidents
  5. If behind a proxy, configure HTTPS_PROXY correctly
Defensive patterns

Strategy: retry

Validate before calling

rate, _ := http.Get("https://api.github.com/rate_limit")
// inspect X-RateLimit-Remaining header before batch installs
if remaining == 0 { wait until reset before calling `oh-my-posh font` }

Try / catch

for attempt := 0; attempt < 3; attempt++ {
	err := installFont("FiraCode")
	if err == nil { return nil }
	if strings.Contains(err.Error(), "failed to get") {
		time.Sleep(time.Duration(1<<attempt) * time.Second) // backoff for rate limit
		continue
	}
	return err
}

Prevention

When it happens

Trigger: `http.HTTPClient.Do(req)` returns an error, or `response.StatusCode != httplib.StatusOK` in `fetchFontAssets(repo)`, called by `fonts()` and `CascadiaCode`. Most common: 403 from unauthenticated GitHub API rate limiting (60 req/hr per IP).

Common situations: Shared CI runner IP exhausted the unauthenticated GitHub rate limit; GitHub outage; corporate proxy blocking api.github.com; DNS failure offline.

Related errors


AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31). Data as JSON: /api/errors/7ca9d3c25afe1c0b. Report an issue: GitHub.