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
{{ message }}
Repository navigation
Using zig build on macOS fails to fetch remote repositories through a proxy. #25996
Just use zig build in any Zig project that requires remote packages.
Expected Behavior
Just use zig build for any
build.zig.zon:8:20: error: unable to discover remote git server capabilities: HttpConnectionClosing
.url = "git+https://github.com/Hejsil/zig-clap.git#5289e0753cd274d65344bef1c114284c633536ea",
I tried to remove https and use http
build.zig.zon:8:20: error: unable to discover remote git server capabilities: HttpConnectionClosing
.url = "git+http://github.com/Hejsil/zig-clap.git#5289e0753cd274d65344bef1c114284c633536ea",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Still not working. This problem has actually existed for a long time, present since the early versions of the package manager. This is also one of the reasons blocking me from learning Zig. I've been trying to solve it, but haven't found a solution. It seems Zig will never use a proxy channel...
Actually, for a while, dvui could be successfully compiled after I opened the VPN, even though it needed to access the remote repository, but now it doesn't work anymore. This is indeed strange.🤔
Activity
mrjbq7 commentedon Nov 21, 2025
I can't reproduce that locally, but I'm not using a proxy -- how is yours configured?
MatthiasPortzel commentedon Nov 21, 2025
#19878
xuanluoya commentedon Nov 22, 2025
Just normally opening the VPN and setting up the proxy on the terminal. look like:
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890In the current environment, only zig shows similar symptoms; other programs all obediently go through the proxy.
xuanluoya commentedon Nov 22, 2025
xuanluoya commentedon Nov 22, 2025
🤔To be precise, the HTTP request seems to be working; I tested it and there were no errors.
From zig cookbook
Request:
Actually, for a while, dvui could be successfully compiled after I opened the VPN, even though it needed to access the remote repository, but now it doesn't work anymore. This is indeed strange.🤔
xuanluoya commentedon Nov 22, 2025
I tried compiling pixi again, but it seems that a miracle didn't happen...
( ˘•ω•˘ )
zig build pixi/build.zig.zon:30:20: error: unable to discover remote git server capabilities: HttpConnectionClosing .url = "git+https://github.com/foxnne/dvui-dev#77bded1a0b46fc44879c694bbbfc3f379b55ed68", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~