Build failing due to key error

marupilla's Avatar


28 Jul, 2020 05:50 PM

Hello Team,

My build failing due to some mingw2 key error. The error logs looks like this:

C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syu"
:: Synchronizing package databases...
downloading mingw32.db...
downloading mingw32.db.sig...
error: mingw32: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
:: Import PGP key 4096R/87771331B3F1FF5263856A6D974C8BE49078F532, "David Macek <[email blocked]>", created: 2018-01-14? [Y/n] error: mingw32: signature from "David Macek <[email blocked]>" is unknown trust
error: failed to update mingw32 (invalid or corrupted database (PGP signature))
downloading mingw64.db...
downloading mingw64.db.sig...
error: mingw64: signature from "David Macek <[email blocked]>" is unknown trust
error: failed to update mingw64 (invalid or corrupted database (PGP signature))
downloading msys.db...
downloading msys.db.sig...
error: msys: signature from "David Macek <[email blocked]>" is unknown trust
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases
Command exited with code 1

  1. 1 Posted by Stephan on 28 Jul, 2020 06:04 PM

    Stephan's Avatar

    Had the same issue. For the time until this gets fixed you could implement the workaround from


  2. Support Staff 2 Posted by Feodor Fitsner on 28 Jul, 2020 09:42 PM

    Feodor Fitsner's Avatar

    Thanks for the solution. It's definitely upstream changes as the image hasn't been changed recently.

  3. 3 Posted by Stephan on 29 Jul, 2020 07:48 AM

    Stephan's Avatar

    Well, the image seems to be very outdated in terms of the actual status of MSYS2. This made a lot of workarounds necessary in the past couple of month. Maybe you could consider upgrading the image with a new snapshot of an actual MSYS2 environment

    Thanks in advance

  4. 4 Posted by Alexander F on 29 Jul, 2020 01:16 PM

    Alexander F's Avatar

    We have also had troubles recently because of this. An updated image would do wonders.

  5. Support Staff 5 Posted by Feodor Fitsner on 29 Jul, 2020 05:56 PM

    Feodor Fitsner's Avatar

    Use Visual Studio 2019 image with the most recent MSYS.

  6. 6 Posted by Stephan on 29 Jul, 2020 07:15 PM

    Stephan's Avatar

    Well we do use this image

  7. Support Staff 7 Posted by Feodor Fitsner on 30 Jul, 2020 02:14 AM

    Feodor Fitsner's Avatar

    Visual Studio 2019 image has been just updated. This script is used to install MSYS on the image. Image as baked on July 26th. I'd say MSYS there is quite "recent". If you can spot what's missing we could update the script by the next image update.

  8. 8 Posted by Stephan on 30 Jul, 2020 07:35 AM

    Stephan's Avatar

    The script looks ok except that update of pacman-mirrors is commented out.
    However from what I see on the logs and console It seems not to have worked. could you provide the console output from the script to see what will be generated

  9. Support Staff 9 Posted by Feodor Fitsner on 31 Jul, 2020 04:43 AM

    Feodor Fitsner's Avatar

    We are not collecting pacman logs during msys installation. However, you can use the same script and call it during your build - it will remove existing C:\msys64 folder and start over - you'll be able to observe the installation. Also, feel free to modify script for logs collection.

  10. 10 Posted by Stephan on 31 Jul, 2020 12:11 PM

    Stephan's Avatar

    Hi Feodor,
    I did run the script in my project.
    it worked fine and it delivered an actual build.
    I inserted a pacman -Q command in the chain as well and it does not deliver the same or at least mostly similar results befor or after the script. So it seems this has not been run for the 29 July update of the Visual Studio 2019 update (it isn't mentioned an MSYS2 upgrade for this update in the changelog neither)

  11. 11 Posted by Stephan on 06 Sep, 2020 04:44 PM

    Stephan's Avatar

    The script hasn't been run for the latest update of VS2019 again.
    Please run the script and provide an actual build of MSYS2 in the next image

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • Screen_Shot_2020-07-28_at_13.49.46.png 114 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac