-
Notifications
You must be signed in to change notification settings - Fork 841
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
Certificate has unknown CA on Windows Subsystem for Linux #4560
Comments
I wonder if there's some checking against the subject on there, rather than the list of alternative names? I'll get somebody to investigate. |
@borsboom has suggested: Could you be missing ca-certificates? |
Also, how did you install Stack? |
@borsboom I was indeed missing ca-certificates, but installing it didn't fix the problem. I've long since forgotten how stack was installed, but just to verify, I uninstalled stack using your comment and installed it again with |
Hello, I'm also on WSL and I have the same problem. |
@crockeea can you confirm, does If you can prove that the host OS has the CA certs and can talk to github, stack will work too. This does not sound like an issue specific to Stack. |
The first curl command output nothing. A stackoverflow answer suggests the following for listing CAs:
On real Ubuntu, this command outputs 148 lines, the first few of which are:
On Bash on Ubuntu on WIndows, the same command also outputs 148 lines, the first few of which are:
|
@ketzacoatl What are your thoughts? It looks like WSL can talk to Github and has CAs available, yet stack still does not work. |
@crockeea Can you follow the debug steps in the tls package documentation? https://github.com/vincenthz/hs-tls#common-issues |
In Bash on Ubuntu on Windows:
(and after modifying the cabal file, I get the same error for I'm happy to try anything else... |
I think you need to use a version of network less than 3
…On Tue, Mar 26, 2019, 7:47 AM crockeea ***@***.***> wrote:
In Bash on Ubuntu on Windows:
$ cabal install x509-util
$ ./cabal/bin/x509-util system
<prints tons of certificates>
$ cabal install tls-debug
...
Configuring tls-debug-0.4.5...
Building tls-debug-0.4.5...
Preprocessing executable 'tls-stunnel' for tls-debug-0.4.5...
src/Stunnel.hs:4:8:
Could not find module ‘Network.BSD’
Perhaps you meant
Network.TLS (from ***@***.***_IPYqPctMYvpANuBu2lf3kO)
(and after modifying the cabal file, I get the same error for
tls-retrievecertificate, which was the next thing I was trying to run).
I'm happy to try anything else...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4560 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADBB_Vb-0nvOR5CMJ_lYhIhP1EQ-F96ks5vabR7gaJpZM4aiAN5>
.
|
This all appears to be working to me, but I confirmed that stack still fails. Using tls-retrievecertificate on |
As a short-term workaround, you can try manually downloading the snapshot file to /root/.stack/build-plan/lts-13.3.yaml (see the log messages at the very top). It's possible that a new version of one of the dependencies fixed a bug affecting WSL. One way to test this would be to build tls-debug against lts-11.22 (the snapshot Stack 1.9.3 is built against), using |
FYI, I spun up WSL on my Windows machine, and I'm unable to reproduce the issue here. |
@snoyberg About the time you said you couldn't reproduce, I was also unable to reproduce. I have no idea what I did to fix the issue. When I went back in my terminal history, I see that the error I reported in #4560 (comment) is in fact not a certificate error:
My best guess as to what fixed the original certificate problem is an upgrade to Windows 10 1809 (from 1703). The error about "Name does not resolve" appears to have been a coincidental DNS issue(?). |
Huh, weird. Glad it's working now! |
I'm still on 1703 (employed-enforced decision which I can't do anything about), and am hitting this issue as well. I have tried the various things attempted by crockeea as above, to the same effect. |
For what it's worth to anyone stumbling on this – the issue seemed to magically disappear for me after running a |
General summary/comments (optional)
Stack works fine with Powershell and mingw64, but when I try to use it through "Bash on Ubuntu on Windows", I get
Steps to reproduce
To reproduce:
stack build
Expected
I expect that stack will begin downloading and installed package dependencies.
Actual
Instead, I get a certificate error for
raw.githubusercontent.com
.Stack version
What I've tried:
Prior tickets with similar errors (#2241, a stackoverflow question, another issue, and yet another issue), suggested going to several sites in IE/Edge. This doesn't help. These tickets also suggest that the problem may be related to hs-tls somehow, but the troubleshooting section there doesn't reveal anything:
and
x509-util system
shows a boatload of certificates.The text was updated successfully, but these errors were encountered: