Looks like Flatpak is not working under Rocky Linux 8. I tried this on a fresh installation of Rocky Linux 8:
flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
The command just hangs and does nothing.
I tested it on OpenSUSE Tumbleweed, and it works perfectly.
What now ?
In a standard Rocky Linux 8.6 (Server with GUI, GNOME desktop) a window asking for the user’s password pops up. After entering the password, the installation is finished. If using sudo, the window does not pop us and the installation is done immediately.
Alternatively the flatpak remote can be installed in this way:
sudo wget -P /etc/flatpak/remotes.d https://flathub.org/repo/flathub.flatpakrepo
That did the trick. Thanks very much !