Flatpak-builder doesn't recognize my flathub remote

I’m trying to build my first Flatpak, and flatpak-builder seems to be unaware of my configured flathub remote:

$ flatpak remotes --columns=all
Name    Title           URL                                    Collection ID Subset Filter Priority Options    Comment                                    Description                                Homepage             Icon
fedora  Fedora Flatpaks oci+https://registry.fedoraproject.org -             -      -      1        system,oci -                                          -                                          -                    -
flathub Flathub         https://dl.flathub.org/repo/           -             -      -      1        system     Central repository of Flatpak applications Central repository of Flatpak applications https://flathub.org/ https://dl.flathub.org/repo/logo.svg
$ flatpak install -y flathub org.gnome.Sdk/x86_64/45
Looking for matches…
Skipping: org.gnome.Sdk/x86_64/45 is already installed
$ flatpak-builder --force-clean --sandbox --user --install --install-deps-from=flathub --ccache --mirror-screenshots-url=https://dl.flathub.org/media/ --repo=repo builddir manifest.yaml
Dependency Sdk: org.gnome.Sdk 45
Installing org.gnome.Sdk/x86_64/45 from flathub
error: No remote refs found for ‘flathub’
Error installing deps: running `flatpak --user install -y --noninteractive flathub org.gnome.Sdk/x86_64/45`: Child process exited with code 1

What am I missing?

I’m running flatpak-builder with the --user flag, which means only the remotes from flatpak remotes --user are available. I should either drop --user flag or add the Flathub remote on user level as well.

1 Like