-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go get x509: failed to load system roots and no roots provided #10875
Comments
go being unable to interoperate with the system keychain is a known issue ( |
@pikajude this is with go1.5. |
The nix profile sets the SSL_CERT_FILE environment variable but go doesn't seem to take that into account. |
There's an open Go issue to support In the meantime I think you need to ensure this did the trick for me:
|
I actually have a patch to add SSL_CERT_FILE support to go but then decided it was too much work maintaining the patch. If you're interested it's at zimbatm@e5557a6 . Both go 1.4 and 1.5 are supported. I did it before go 1.6 so that would need to be adapted. |
yo I didn't get very far trying to figure this out. The thing with putting the certs into package main
import ( "fmt"; "net/http")
func main() { fmt.Println(http.Get("https://nixos.org/channels/nixos-unstable/git-revision")) } It fails with the error message in the issue title. Trying to dtrace (I'm not very good with OS X) it, I noticed that it works when running as root. Unclear what the deal is, looks like there's some certificate data scrolling past in the trace either way. Does go1.7 change the behavior? I haven't been able to get it to build so far. |
@andrewrynhard does mstone@fc28879 work around the problem for you (perhaps if adjusted for go 1.5 instead of 1.6)? |
This is fixed for 1.7 |
Installed go with nix in a nix-shell environment and I am getting errors when using
go get
. As the title explains the error isx509: failed to load system roots and no roots provided
. I have made sure that thenix.sh
environment variables are set but still get this error. This is on OS X.The text was updated successfully, but these errors were encountered: