MSYS2 and "At least one valid and enabled repository required for this action to succeed."

The maintenancetool.exe is IMO undeniably a flat out a broken monstrosity that the msys2 DEV team (apparently 4 people in the entire WORLD) listed here on the MSYS2 Github repo:

4 DEVs with MSYS2 repo/project rights

should have yanked long ago, and part one of the answer is that it is simply not possible at this time to do ANYTHING with it except for a complete manual uninstall of the entire MSYS2.

I would never under any other circumstance actually post an official stack answer like this but it's sadly the truth and in this case, will save others a lot of time searching. I have myself wasted much time trying everything too, and yes, you can manually attempt to add repos for QT etc. but that is NOT a valid solution for what it was intended which is usually mingwin32/64/msys+ on a typical Windows install.

Instead, as only a partial answer, part two is that the only workaround I have found is to launch the shell, and because you WILL receive in use errors etc, I typically just jump to running:

   <DO>

1. pacman -Syu --force

2. <WAIT UNTIL PROMPTED WITH IN USE (IF CORE UPDATING) - CLICK X TO KILL SHELL/RELAUNCH/RERUN SAME ABOVE COMMAND AGAIN>

   <LOOP UNTIL IT REPORTS UP TO DATE>

Until the DEVs that committed this code then left it for the public as the PRIMARY face of the toolset broken like this for years decides to place WORKING code on the form that provides the functions as intended by the darn existing unwired GUI buttons/dropdowns/textboxes/etc. (make it a working GUI package management interface) do yourself a favor and do what I did to remind yourself next time and make the final step here to place a maintenancetool.exe.IS.BROKEN!!!.txt file right under it in the directory. :)


Too long post to be a comment so I'm posting it as answer. If you do the pacman -Syu what do you get? Do you get any repositories?

You should get some like in my case:

$ pacman -Syu
:: Synchronizing package databases...
 mingw32                  485.9 KiB   576K/s 00:01 [#####################] 100%
 mingw32.sig              119.0   B  0.00B/s 00:00 [#####################] 100%
 mingw64                  486.8 KiB   956K/s 00:01 [#####################] 100%
 mingw64.sig              119.0   B  0.00B/s 00:00 [#####################] 100%
 msys                     171.6 KiB  1016K/s 00:00 [#####################] 100%
 msys.sig                 119.0   B  0.00B/s 00:00 [#####################] 100%
:: Starting core system upgrade...
warning: terminate other MSYS2 programs before proceeding
resolving dependencies...
looking for conflicting packages...

Packages (2) msys2-runtime-2.11.1-2  msys2-runtime-devel-2.11.1-2

Total Download Size:    7.00 MiB
Total Installed Size:  40.27 MiB
Net Upgrade Size:       0.73 MiB

:: Proceed with installation? [Y/n]

Do you get similar response when using msys2 shell?

As I wrote already in comment I recommended using scoop to install msys2.