Flatpak install --user: error: No remote refs found

[workstation user ~]% flatpak --user --verbose install flathub org.keepassxc.KeePassXC
F: Opening user flatpak installation at path /home/user/.local/share/flatpak
Looking for matches…
error: No remote refs found for ‘flathub’
zsh: exit 1     flatpak --user --verbose install flathub org.keepassxc.KeePassXC
[workstation user ~]% 

Same behavior on Qubes-Debian.

OK i found the solution (not well documented):

user@host:~$ flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

user must use --user to add the remote repo.

It’s documented here:
Install from Flatpak

(Whonix is based on Kicksecure.)

Was not required for me.

Could be because FlatPak as a Software Source / flathub as a source of software - #61 by Patrick. Since Flathub is enabled globally (no --user option), the --user remote-add command might not be required.

--user remote-add is a must step and not well documented.

otherwise repository going to be on system wide/global (current default), and we have the other issue of not having this working at all in whonix/kicksecure environment.

To make it working, user must add the repo into user space only, and to do that he must use --user.