Skip to content

Commit 83f9e47

Browse files
vkuttypCopilot
andcommitted
fix: store Microsoft apt key as .asc instead of gpg --dearmor
Avoids 'gpg: dearmoring failed: File exists' error on ubuntu-24.04 runners where the keyring file may already exist. Storing the ASCII-armored key directly in /etc/apt/trusted.gpg.d/ is the simpler, more reliable approach. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 08b50ae commit 83f9e47

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ jobs:
9090
- name: Install sqlcmd
9191
run: |
9292
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
93-
| sudo gpg --batch --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
94-
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-prod.gpg] \
95-
https://packages.microsoft.com/ubuntu/24.04/prod noble main" \
93+
| sudo tee /etc/apt/trusted.gpg.d/microsoft.asc > /dev/null
94+
echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/24.04/prod noble main" \
9695
| sudo tee /etc/apt/sources.list.d/mssql-release.list
9796
sudo apt-get update -q
9897
sudo ACCEPT_EULA=Y apt-get install -y sqlcmd

0 commit comments

Comments
 (0)