terminal prompts disabled / 410 Gone (private module) Go Origin: Application & API OSI layer 7 · Application Last updated 4 Nov 2026

Go: fatal: could not read Username for 'https://github.com': terminal prompts disabled

Go tried to fetch a private repository without credentials (and, via the public proxy, got 404/410).

Exact message you may see 410 Gone go get privateverifying module: 410 Gonego: module: reading https://proxy.golang.org: 404 Not Found
Seen on: Go Git Docker

Meaning

Tell Go the module is private with GOPRIVATE, and give git credentials non-interactively: a ~/.netrc, a git insteadOf rewrite to SSH, or a token in CI. Without GOPRIVATE Go asks the public proxy, which cannot see your repo.

Common causes

  • GOPRIVATE not set
  • No credentials for HTTPS git
  • SSH key not available in CI/Docker
  • Token expired
  • Public proxy/sumdb queried for private paths

⚡ Quick fix

  1. go env -w GOPRIVATE=github.com/yourorg/*
  2. git config --global url."git@github.com:".insteadOf "https://github.com/"
  3. In CI use a token: git config --global url."https://x:${TOKEN}@github.com/".insteadOf "https://github.com/"

Detailed fix by platform

Docker

  1. Use BuildKit secrets or SSH mounts (RUN --mount=type=ssh go mod download) instead of baking tokens into the image

How to diagnose

  1. GOPRIVATE — Set?
  2. Auth — SSH or token?
  3. CI — Secrets available?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

cannot find package in any of GOROOT / GOPATH — Go: cannot find package "github.com/pkg/errors" in any of: /usr/local/go/src/github.com/pkg/errors (from $GOROOT) /go/src/github.com/pkg/errors (from $GOPATH) (Go)cannot find package i…E0432: unresolved import — Rust: error[E0432]: unresolved import `crate::utils` — maybe a missing crate `utils`? (Rust)E0432: unresolved imp…E0433: failed to resolve: use of undeclared type or module — Rust: error[E0433]: failed to resolve: use of undeclared type `HashMap` (Rust)E0433: failed to reso…E0603: module/function/struct is private — Rust: error[E0603]: function `helper` is private (Rust)E0603: module/functio…Failed to download module (git/registry/path) — Terraform: Error: Failed to download module — Could not download module "vpc" (main.tf:1) source code from "git::https://github.com/org/repo.git": error downloading (Terraform)Failed to download mo…go: updates to go.mod needed — Go: go: updates to go.mod needed; to update it: go mod tidy (Go)go: updates to go.mod…invalid version: unknown revision — Go: go: github.com/foo/bar@v1.2.3: invalid version: unknown revision v1.2.3 (Go)invalid version: unkn…listen tcp :8080: bind: address already in use — Go: listen tcp :8080: bind: address already in use (Go)listen tcp :8080: bin…terminal …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.