@@ -122,44 +122,40 @@ To download and validate the signature of this package, run the following:
122122sudo apt-get install -y curl debsig-verify
123123
124124# Download public key signature file
125- curl -s https://api.github.com/repos/microsoft/git/releases/latest \
126- | grep -E ' browser_download_url.*msft-git-public.asc' \
127- | cut -d : -f 2,3 \
128- | tr -d \" \
129- | xargs -I ' url' curl -L -o msft-git-public.asc ' url'
125+ curl -Os https://packages.microsoft.com/keys/microsoft-2025.asc
130126
131127# De-armor public key signature file
132- gpg --output msft-git-public .gpg --dearmor msft-git-public .asc
128+ gpg --output microsoft-2025 .gpg --dearmor microsoft-2025 .asc
133129
134- # Note that the fingerprint of this key is "B8F12E25441124E1 ", which you can
130+ # Note that the fingerprint of this key is "EE4D7792F748182B ", which you can
135131# determine by running:
136- gpg --show-keys msft-git-public .asc | head -n 2 | tail -n 1 | tail -c 17
132+ gpg --show-keys microsoft-2025 .asc | head -n 2 | tail -n 1 | tail -c 17
137133
138134# Copy de-armored public key to debsig keyring folder
139- sudo mkdir /usr/share/debsig/keyrings/B8F12E25441124E1
140- sudo mv msft-git-public .gpg /usr/share/debsig/keyrings/B8F12E25441124E1 /
135+ sudo mkdir /usr/share/debsig/keyrings/EE4D7792F748182B
136+ sudo mv microsoft-2025 .gpg /usr/share/debsig/keyrings/EE4D7792F748182B /
141137
142138# Create an appropriate policy file
143- sudo mkdir /etc/debsig/policies/B8F12E25441124E1
139+ sudo mkdir /etc/debsig/policies/EE4D7792F748182B
144140cat > generic.pol << EOL
145141<?xml version="1.0"?>
146142<!DOCTYPE Policy SYSTEM "https://www.debian.org/debsig/1.0/policy.dtd">
147143<Policy xmlns="https://www.debian.org/debsig/1.0/">
148- <Origin Name="Microsoft Git" id="B8F12E25441124E1 " Description="Microsoft Git public key"/>
144+ <Origin Name="Microsoft Git" id="EE4D7792F748182B " Description="Microsoft Git public key"/>
149145 <Selection>
150- <Required Type="origin" File="msft-git-public .gpg" id="B8F12E25441124E1 "/>
146+ <Required Type="origin" File="microsoft-2025 .gpg" id="EE4D7792F748182B "/>
151147 </Selection>
152148 <Verification MinOptional="0">
153- <Required Type="origin" File="msft-git-public .gpg" id="B8F12E25441124E1 "/>
149+ <Required Type="origin" File="microsoft-2025 .gpg" id="EE4D7792F748182B "/>
154150 </Verification>
155151</Policy>
156152EOL
157153
158- sudo mv generic.pol /etc/debsig/policies/B8F12E25441124E1 /generic.pol
154+ sudo mv generic.pol /etc/debsig/policies/EE4D7792F748182B /generic.pol
159155
160- # Download Debian package
156+ # Download Debian package (substitute `amd64` with `arm64` on ARM machines)
161157curl -s https://api.github.com/repos/microsoft/git/releases/latest \
162- | grep " browser_download_url.*deb" \
158+ | grep " browser_download_url.*amd64. deb" \
163159| cut -d : -f 2,3 \
164160| tr -d \" \
165161| xargs -I ' url' curl -L -o msft-git.deb ' url'
0 commit comments