Skip to content
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

CA installation in Windows git-bash (curl there, etc) #159

Open
rfay opened this issue Apr 24, 2019 · 8 comments
Open

CA installation in Windows git-bash (curl there, etc) #159

rfay opened this issue Apr 24, 2019 · 8 comments
Labels
root store A request to support a new root store Windows Requires Windows expert

Comments

@rfay
Copy link

rfay commented Apr 24, 2019

It would be wonderful if in addition to all the wonderful places the CA is already installed it could be installed in the git-bash ecosystem (for curl in windows git bash).

Thanks for mkcert! it's is an amazing breakthrough. I'm integrating it into ddev a local web development environment which runs on most platforms. And it's now able to trust local certs for the very first time. Thanks!

@FiloSottile
Copy link
Owner

Can you provide some more info on that ecosystem? I don't use Windows, so I wouldn't know where to start to find its root store.

@FiloSottile FiloSottile added the enhancement New feature or request label Jun 1, 2019
@rfay
Copy link
Author

rfay commented Jun 3, 2019

Thanks, I haven't found a solution yet, but poking around on the web:

I haven't tried the first with the curl that ships in the git-for-windows world; maybe it would work. The second (git config) approach definitely didn't work for me.

@rfay
Copy link
Author

rfay commented Jun 3, 2019

It looks to me like

$ cat $(mkcert -CAROOT)/rootCA.pem >> /mingw64/ssl/certs/ca-bundle.crt

does the job from within git-bash context.

Outside git-bash context, I believe the directory is typically C:\Program Files\Git\mingw64\ssl\certs

@FiloSottile FiloSottile added the Windows Requires Windows expert label Aug 17, 2019
@closedstack
Copy link

In Most corporate settings it is best to set it to use Windows Trusted CA Store, since that will be managed by your IT (like if they inspect outbound HTTPS traffic) using
git config --global http.sslBackend schannel
as suggested by @rfay

@mkontani
Copy link

Typically, windows has no certificates dir, but stores in win registory.
If you want to import into the registory with using cli, It seems that certutil command can be used.

certutil.exe -addstore root c:\capublickey.cer

See: https://superuser.com/questions/1506440/import-certificates-using-command-line-on-windows

@FiloSottile FiloSottile added root store A request to support a new root store and removed enhancement New feature or request labels Oct 25, 2020
@jkugler
Copy link

jkugler commented Dec 9, 2020

@rfay From where did you acquire mkcert? It does not seem to be in my default git bash install.

Edit: I might not need it. Just cat and append to the ca-bundle.crt file.

Edit 2: solution not working for me...so, may be a problem somewhere else.

@rfay
Copy link
Author

rfay commented Dec 9, 2020

@jkugler - download the windows binary from the releases page, https://github.com/FiloSottile/mkcert/releases

@MarlonMrN
Copy link

In Most corporate settings it is best to set it to use Windows Trusted CA Store, since that will be managed by your IT (like if they inspect outbound HTTPS traffic) using
git config --global http.sslBackend schannel
as suggested by @rfay

but how to make that config for the entire git-bash? For example, I cannot perform any curls to https endpoints in my bash... (and all of my package managers suffer from the same issue... it's a pain to add the certificates for each of them, as they expire...)
Any ideas how to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
root store A request to support a new root store Windows Requires Windows expert
Projects
None yet
Development

No branches or pull requests

6 participants