You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: document Go module proxy setup in remote environment
The HTTP_PROXY/HTTPS_PROXY env vars are pre-configured in the Claude
Code remote environment and Go's toolchain respects them automatically.
Document this so future sessions don't waste time debugging module
fetching. Also improve the troubleshooting section with actionable steps.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
https://claude.ai/code/session_01WLKDmB7kemgPsjsj9KFEXa
Copy file name to clipboardExpand all lines: CLAUDE.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,13 @@ This document provides essential information for working with the sqlc codebase,
14
14
15
15
When running in the Claude Code remote environment (or any environment without Docker), you can install PostgreSQL and MySQL natively. The test framework automatically detects and uses native database installations.
16
16
17
+
### Network Proxy (Pre-configured)
18
+
19
+
The Claude Code remote environment routes outbound traffic through an HTTP proxy via the `HTTP_PROXY` and `HTTPS_PROXY` environment variables. **Go module operations (`go mod tidy`, `go mod download`, `go get`, etc.) work automatically** because Go's toolchain respects these variables. No extra configuration is needed for the Go module proxy (`proxy.golang.org`) or checksum database (`sum.golang.org`).
20
+
17
21
### Step 1: Configure apt Proxy (Required in Remote Environment)
18
22
19
-
The Claude Code remote environment requires an HTTP proxy for apt. Configure it:
23
+
The apt package manager needs its own proxy configuration since it does not read `HTTP_PROXY`:
20
24
21
25
```bash
22
26
bash -c 'echo "Acquire::http::Proxy \"$http_proxy\";"'| sudo tee /etc/apt/apt.conf.d/99proxy
In the Claude Code remote environment, Go module fetching works automatically via the `HTTP_PROXY`/`HTTPS_PROXY` environment variables. If you see errors about `storage.googleapis.com` or `proxy.golang.org`:
310
316
311
-
If you see errors about `storage.googleapis.com`, the Go proxy may be unreachable. Tests may still pass for packages that don't require network dependencies.
317
+
1.**Verify proxy vars are set:**`echo $HTTP_PROXY` (should be non-empty in the remote environment)
318
+
2.**Test connectivity:**`go mod download 2>&1 | head` to check for errors
319
+
3.**If proxy is not set** (e.g., local development without Docker), Go will try to reach `proxy.golang.org` directly, which requires internet access
0 commit comments