-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitSSLConf.cmd
More file actions
29 lines (23 loc) · 780 Bytes
/
gitSSLConf.cmd
File metadata and controls
29 lines (23 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@echo off
SETLOCAL EnableDelayedExpansion
SET _ISADMIN=0
call :checkadmin
if %_ISADMIN% NEQ 1 echo Must run as admin^^!^^! & goto :Done
SET INSTALL_=
set /p INSTALL_="Refresh CA cert bundle with certs from the windows cert store ? [y/n]"
if /I "%INSTALL_:~0,1%" NEQ "y" Goto GitPad
REM export the windows certs
REM maybe replace this step by using the schannel support available as of 2.14
BundleWinCerts "C:\Program Files\Git\mingw64\ssl\certs\ca-bundle.crt" "C:\Program Files\Git\mingw64\ssl\certs\ca-bundle-plusWinRoot.crt"
git config --system http.sslcainfo "C:/Program Files/Git/mingw64/ssl/certs/ca-bundle-plusWinRoot.crt"
:UtilityFunctions
:checkadmin
openfiles > NUL 2>&1
if NOT %ERRORLEVEL% EQU 0 (
SET _ISADMIN=0
) else (
SET _ISADMIN=1
)
goto :eof
:Done
ENDLOCAL