How to Fix Go's 'GOPROXY Contains No Entries' Error in 30 Seconds
Go developers running 'go mod tidy' may encounter a flood of errors stating the GOPROXY list contains no usable proxy URLs, despite being set. The error is caused by a malformed, blank, or explicitly disabled GOPROXY environment variable, often introduced by shell overrides, stray characters, or corporate network configurations. On Windows with Git Bash, system-level environment variables can silently shadow Go's own configuration file, making the issue harder to trace. The fix involves unsetting the bad shell variable, then using 'go env -w' to write a valid proxy URL directly to Go's persistent config file. If the problem persists across sessions, developers should also check Windows System Environment Variables, as those can override Go's settings each time a new shell opens.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in