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

Configure http.sslcainfo in Git for Windows' own system-wide config #531

Closed
dscho opened this issue Nov 15, 2015 · 7 comments
Closed

Configure http.sslcainfo in Git for Windows' own system-wide config #531

dscho opened this issue Nov 15, 2015 · 7 comments
Assignees
Milestone

Comments

@dscho
Copy link
Member

dscho commented Nov 15, 2015

At the moment, we configure this in C:\ProgramData\Git\config which is wrong because

  1. other Git applications might not be able to handle our ca certs
  2. when Git for Windows is uninstalled, the path would naturally become invalid
  3. when upgrading from a 32-bit to a 64-bit Git for Windows, we leave an existing C:\ProgramData\Git\config mostly alone
@fourpastmidnight
Copy link

@dscho I know the issue still says its open, but is it really open? As I continue to work on the MSI installer on #682, if this is still an issue, I'd like to keep this issue in mind. There's no sense in creating an installer that doesn't resolve some of these long outstanding issues from the outset.

I'm familiar with the "system-wide" git config in C:\ProgramData\Git, as well as the user's global git config and the local repository git config, but where would the Git for Windows' "own system-wide config" reside, and how would you modify it via git config --???configtype?? since the only legal options are system, global, and local?

@fourpastmidnight
Copy link

@dscho: Ah, I found the Git for Windows' "own system-wide config" reading through other installer issues, specifically, you mentioned it in #104. But my second question still stands--how do you modify it via git config, or is it something you can only modify via your favorite text editor?

@dscho
Copy link
Member Author

dscho commented Apr 14, 2016

how do you modify it via git config

git config -f C:/ProgramData/Git/config ...

@dscho
Copy link
Member Author

dscho commented Apr 14, 2016

Oh, and yes: this issue is still open and awaits patiently the time when I can take care of it.

@fourpastmidnight
Copy link

@dscho: Thanks for the info!

@fourpastmidnight
Copy link

@dscho: I did some work on this with respect to the MSI installer on #682. The MSI installer now installs mingw$BITNESS\etc\gitconfig to %ProgramData%\Git\config. It will then eventually run the command git config -f /$ProgramData/Git/config http.SslCAInfo "/C:\Program Files\Git\mingw$BITNESS\ssl\certs\ca-bundle.crt". (The path to the certs gets converted correctly via MinGW POSIX path conversion since I run this command from the Bash shell.)

Also, because the installer is actually installing the %ProgramData%\Git\config, upon uninstall, this file is removed. So I think that resolves the issue of an "invalid path" that you were talking about in point 2 above. Also, point 3 becomes irrelevant because the MSI handles it all, regardless of architecture. I have no idea about point 1 above.

I have one more lingering concern: I noticed in the original InnoSetup installer that when setting the option to enable the Git Credential Manager for Windows, the command git config --system is used. If I run this on my machine, this returns an error:

fatal: unable to read config file 'C:\Program Files\Git\mingw64/etc/gitconfig': No such file or directory

I am only running Git for Windows 2.7.1.windows.2, so maybe that has something to do with it? If not, how is it possible to configure Git such that running git config --system should look for the configuration file at %ProgramData%\Git\config?

@dscho
Copy link
Member Author

dscho commented May 13, 2016

how is it possible to configure Git such that running git config --system should look for the configuration file at %ProgramData%\Git\config?

It should not... As far as Git for Windows is concerned, the "system" is really the MSYS2 environment. ProgramData is another level, one that core Git does not know (yet).

@dscho dscho added this to the v2.12.3 milestone Apr 4, 2017
dscho added a commit to git-for-windows/build-extra that referenced this issue Apr 4, 2017
The `http.sslCAInfo` config setting [is now private
to the Git for Windows installation that owns the
file](git-for-windows/git#531).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants