Skip to content

Commit ce032c7

Browse files
committed
sdk-installer: ensure that Git for Windows' keyring is imported
This is required so that the SDK can be installed fully, now that we sign each and every package in Git for Windows' Pacman repository. As the post-install script of msys2-keyring destroys every previous attempt to initialize Pacman's keyring, we need to install msys2-keyring (and gnupg) specifically before adding Git for Windows' keys. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 23b2f92 commit ce032c7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

sdk-installer/setup-git-sdk.bat

+19
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,25 @@
104104

105105
@IF ERRORLEVEL 1 GOTO INSTALL_INFO
106106

107+
@SET /A counter=0
108+
:INSTALL_MSYS2_KEYRING
109+
@SET /A counter+=1
110+
@IF %counter% GEQ 5 @(
111+
@ECHO Could not install msys2-keyring
112+
@PAUSE
113+
@EXIT 1
114+
)
115+
116+
@REM next, force update msys2-keyring
117+
@"%cwd%"\usr\bin\pacman -S --needed --force --noconfirm gnupg msys2-keyring
118+
119+
@IF ERRORLEVEL 1 GOTO INSTALL_MSYS2_KEYRING
120+
121+
@REM now, add Git for Windows' keyring
122+
@"%cwd%"\usr\bin\bash.exe -l -c ^
123+
'/usr/bin/bash /usr/bin/pacman-key --populate git-for-windows'
124+
@IF ERRORLEVEL 1 PAUSE
125+
107126
@SET /A counter=0
108127
:INSTALL_PACMAN
109128
@SET /A counter+=1

0 commit comments

Comments
 (0)