Skip to content

In an SSH session, flatpak install asked me fourteen times for authentication #3001

Closed

Description

@cmurf

Linux distribution and version

Fedora Rawhide

Flatpak version

flatpak-1.4.2-1.fc31.x86_64

Description of the problem

When installing a flatpak without using sudo, I was asked for authentication fourteen times. Seems rather excessive which is why I usually use sudo. But I've read elsewhere a few times people saying 'yeah you really shouldn't need to use sudo' which clearly is very true but would I rather type in my password fourteen times? Or once for sudo and then not be asked by flatpak for authentication for every little thing it wants to do?

Steps to reproduce

$ flatpak install

For example, I just did this on a rawhide test system:

[chris@fmac Downloads]$ ls -l
total 4
-rw-rw-r--. 1 chris chris 4018 Jun 23 20:09 com.slack.Slack.flatpakref
[chris@fmac Downloads]$ flatpak remotes
Name   Options
fedora system,oci
[chris@fmac Downloads]$ flatpak list
[chris@fmac Downloads]$ flatpak install -vv com.slack.Slack.flatpakref
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/chris/.local/share/flatpak
The remote 'flathub', referred to by 'com.slack.Slack' at location https://dl.flathub.org/repo contains additional applications.
Should the remote be kept for future installations? [Y/n]: n
F: Loading https://dl.flathub.org/repo/flathub.flatpakrepo using libsoup
F: Received 4040 bytes
The application com.slack.Slack depends on runtimes from:
  https://dl.flathub.org/repo/
Configure this as new remote 'flathub' [Y/n]: y
F: Calling system helper: ConfigureRemote
==== AUTHENTICATING FOR org.freedesktop.Flatpak.configure-remote ====
Authentication is required to configure software repositories
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: Calling system helper: ConfigureRemote
==== AUTHENTICATING FOR org.freedesktop.Flatpak.configure-remote ====
Authentication is required to configure software repositories
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: Fetching summary file for remote ‘slack-origin’
F: Transaction: install slack-origin:app/com.slack.Slack/x86_64/stable[*]
F: marking op install:app/com.slack.Slack/x86_64/stable resolved to 5eb3cfc6d38e11671e0f1ee0640f696c4ae198339e90c3cae3b075e054a0d0fd
F: Calling system helper: GenerateOciSummary
==== AUTHENTICATING FOR org.freedesktop.Flatpak.metadata-update ====
Authentication is required to update metadata
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: Failed to download optional summary
F: Fetching summary file for remote ‘flathub’
Required runtime for com.slack.Slack/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/18.08) found in remote flathub
Do you want to install it? [Y/n]: y
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform/x86_64/18.08[$old]
F: marking op install/update:runtime/org.freedesktop.Platform/x86_64/18.08 resolved to 5a03802b4550ae60170112dd33f5a5958c34d28e64bb4f21674a642ac01e2e6f
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.Locale/x86_64/18.08[/en]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.VAAPI.Intel/x86_64/18.08[$old]
F: Transaction: install/update flathub:runtime/org.freedesktop.Platform.html5-codecs/x86_64/18.08[$old]
F: marking op install/update:runtime/org.freedesktop.Platform.html5-codecs/x86_64/18.08 resolved to dfca6ff90bc40f1895340fb83d2e5b4bfbf2ea55e1bb264240af7aa58309268a
F: marking op install/update:runtime/org.freedesktop.Platform.VAAPI.Intel/x86_64/18.08 resolved to 2c9e1aa9097f0d1f7e063b448c4b2af746929208a28da16b5c34bf369daa33b1
F: marking op install/update:runtime/org.freedesktop.Platform.Locale/x86_64/18.08 resolved to 2b4e517a4a1af0ead50854e8653165d91883e71ef170f6f1ec9c8b893454d968

com.slack.Slack permissions:
    ipc	network	pulseaudio	x11	devices	file access [1]	dbus access [2]

    [1] xdg-documents:ro, xdg-download, xdg-music:ro, xdg-pictures:ro, xdg-run/dconf, xdg-videos:ro, ~/.config/dconf:ro
    [2] ca.desrt.dconf, org.freedesktop.Notifications, org.kde.StatusNotifierWatcher


 1.	   	org.freedesktop.Platform	x86_64	18.08	flathub	< 290.3 MB
 2.	   	org.freedesktop.Platform.Locale	x86_64	18.08	flathub	< 315.9 MB (partial)
 3.	   	org.freedesktop.Platform.VAAPI.Intel	x86_64	18.08	flathub	< 1.8 MB
 4.	   	org.freedesktop.Platform.html5-codecs	x86_64	18.08	flathub	< 2.9 MB
 5.	   	com.slack.Slack	x86_64	stable	slack-origin	< 63.9 MB

Proceed with these changes to the Default system installation? [Y/n]: y
Installing 1/5…                                                                                                                            F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
==== AUTHENTICATING FOR org.freedesktop.Flatpak.modify-repo ====
Authentication is required to modify a system repository
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: flatpak_dir_pull: Using commit 5a03802b4550ae60170112dd33f5a5958c34d28e64bb4f21674a642ac01e2e6f for pull of ref runtime/org.freedesktop.Platform/x86_64/18.08 from remote flathub
Installing 1/5… ████████████████████ 100%  4.1 MB/s  00:00F: Calling system helper: Deploy
==== AUTHENTICATING FOR org.freedesktop.Flatpak.app-install ====
Authentication is required to install software
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
Installing 2/5…                                                                                                                            F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
==== AUTHENTICATING FOR org.freedesktop.Flatpak.modify-repo ====
Authentication is required to modify a system repository
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: flatpak_dir_pull: Using commit 2b4e517a4a1af0ead50854e8653165d91883e71ef170f6f1ec9c8b893454d968 for pull of ref runtime/org.freedesktop.Platform.Locale/x86_64/18.08 from remote flathub
Installing 2/5… ████████████████████ 100%  2.5 kB/s  00:00F: Calling system helper: Deploy
==== AUTHENTICATING FOR org.freedesktop.Flatpak.app-install ====
Authentication is required to install software
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
Installing 3/5…                                                                                                                            F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
==== AUTHENTICATING FOR org.freedesktop.Flatpak.modify-repo ====
Authentication is required to modify a system repository
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: flatpak_dir_pull: Using commit 2c9e1aa9097f0d1f7e063b448c4b2af746929208a28da16b5c34bf369daa33b1 for pull of ref runtime/org.freedesktop.Platform.VAAPI.Intel/x86_64/18.08 from remote flathub
Installing 3/5… ████████████████████ 100%  202.9 kB/s  00:00F: Calling system helper: Deploy
==== AUTHENTICATING FOR org.freedesktop.Flatpak.app-install ====
Authentication is required to install software
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
Installing 4/5…                                                                                                                            F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
==== AUTHENTICATING FOR org.freedesktop.Flatpak.modify-repo ====
Authentication is required to modify a system repository
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: flatpak_dir_pull: Using commit dfca6ff90bc40f1895340fb83d2e5b4bfbf2ea55e1bb264240af7aa58309268a for pull of ref runtime/org.freedesktop.Platform.html5-codecs/x86_64/18.08 from remote flathub
Installing 4/5… ████████████████████ 100%  279.6 kB/s  00:00F: Calling system helper: Deploy
==== AUTHENTICATING FOR org.freedesktop.Flatpak.app-install ====
Authentication is required to install software
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
Installing 5/5…                                                                                                                            F: Calling system helper: GetRevokefsFd
F: Calling system helper: GetRevokefsFd
==== AUTHENTICATING FOR org.freedesktop.Flatpak.modify-repo ====
Authentication is required to modify a system repository
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: flatpak_dir_pull: Using commit 5eb3cfc6d38e11671e0f1ee0640f696c4ae198339e90c3cae3b075e054a0d0fd for pull of ref app/com.slack.Slack/x86_64/stable from remote slack-origin
Installing 5/5… █▍                     7%  125.2 kB/s  01:59F: Loading https://downloads.slack-edge.com/linux_releases/slack-desktop-3.4.2-amd64.deb using libsoup
Installing 5/5… ████████████████████ 100%  3.4 MB/s  00:00F: Received 62724122 bytes
Installing 5/5… ████████████████████ 100%  2.5 MB/s  00:00F: Calling system helper: Deploy
==== AUTHENTICATING FOR org.freedesktop.Flatpak.app-install ====
Authentication is required to install software
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
F: Calling system helper: RunTriggers
==== AUTHENTICATING FOR org.freedesktop.Flatpak.modify-repo ====
Authentication is required to modify a system repository
Authenticating as: chris
Password: 
==== AUTHENTICATION COMPLETE ====
Installation complete.                                                                                                                       
[chris@fmac Downloads]$ rpm -qa | grep flatpak
flatpak-libs-1.4.2-1.fc31.x86_64
flatpak-1.4.2-1.fc31.x86_64
flatpak-session-helper-1.4.2-1.fc31.x86_64
flatpak-selinux-1.4.2-1.fc31.x86_64
[chris@fmac Downloads]$ 

Activity

  1. mwleeds commented on Jul 3, 2019

    @mwleeds
    Contributor

    Interesting that you are prompted for your password by the text-based polkit agent rather than the graphical one. You have a graphical desktop environment running right?

  2. cmurf commented on Jul 3, 2019

    @cmurf
    Author

    You have a graphical desktop environment running right?

    Correct. It's GNOME.

  3. cmurf commented on Jul 4, 2019

    @cmurf
    Author

    OK this only happens when I do the install on a remote (ssh) system. If I do the install in GNOME Terminal on the target system, I get a single GUI popup asking for authentication, no additional authentication requests happen.

  4. mwleeds commented on Jul 4, 2019

    @mwleeds
    Contributor

    OK this only happens when I do the install on a remote (ssh) system. If I do the install in GNOME Terminal on the target system, I get a single GUI popup asking for authentication, no additional authentication requests happen.

    Flatpak's FlatpakPolkitAgentTextListener is copied from polkit so we may have to change it there to make it remember credentials if possible.

  5. matthiasclasen commented on Jul 11, 2019

    @matthiasclasen
    Collaborator

    I think this is just a matter of policy.

    Our actions have the typical defaults:

          <allow_any>auth_admin</allow_any>
          <allow_inactive>auth_admin</allow_inactive>
          <allow_active>auth_admin_keep</allow_active>
    

    And on top of that, we have a rule that says:

            subject.active == true && subject.local == true &&
            subject.isInGroup("wheel")) {
                return polkit.Result.YES;
    

    When running via ssh, you are missing out on both subject.local and auth_active, so polkit ends up asking every time.

    Install a local rule if operating via ssh is important to you...

  6. changed the title [-]without sudo, flatpak install asked me fourteen times for authentication[/-] [+]In an SSH session, flatpak install asked me fourteen times for authentication[/+] on Jul 12, 2019
  7. brittyazel commented on Oct 9, 2019

    @brittyazel

    I'm on Ubuntu 18.04 and I was hitting an issue with ssh and VNC sessions both not being able to use flatpak without being bombarded with password requests. My "solution" was to append /var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.Flatpak.pkla with:
    ResultAny=yes

    This allows non-local sessions to follow the rule set

  8. dbarnett commented on Mar 7, 2020

    @dbarnett

    Could someone clarify the resolution on this issue? It sounds like it's "working as intended" according to flatpak devs that a standard flatpak install behaves this way over SSH, and can be bypassed by users "installing a local rule". Is there a pointer to instructions for that?

    FWIW, I'm having similar problems running it in a regular terminal on a Pixelbook which may not be "WAI". Should that be a new issue independent of SSH behavior? Any idea why that case wouldn't match the rules here?

  9. FossPrime commented on Mar 3, 2021

    @FossPrime

    I've had this issue on all my Chromebooks with Crostini (debian buster). They use Wayland on LXD. I suspect Windows WSL2 has the same issue... we have a graphical environment, but it's not exactly Gnome 3.

    It's really painful when timeouts happen on long downloads such as app/com.visualstudio.code.oss... I had to restart that 1GB install 3 times due too slowish connection and polkit timing out while I grabbed a byte

    @brittyazel's workaround doesn't work...

    ==== AUTHENTICATING FOR org.freedesktop.Flatpak.modify-repo ====
    

    We just keep getting that message non stop... why does this keep asking us, just to make us suffer?

  10. nicekiwi commented on Apr 1, 2022

    @nicekiwi

    I'm getting this issue in Kubuntu 21.10 in Discover the update flat fails, on CLI (not over ssh) I get the same issue as the OP, asking for sudo password heaps.

  11. sirus20x6 commented on Dec 9, 2022

    @sirus20x6

    i just experienced this on a server that I VNCed into. I lost count at the number of times I had to authenticate just to install deluge, but it was more than excessive.

  12. callegar commented on Mar 24, 2023

    @callegar

    Even if this is closed because flatpak "works as intended" I still think that documenting how to modify the policy so that the credentials are remembered through the flatpak session would be appreciated by most users.

    I would like to add that asking a password multiple time within the same session would probably be regarded by many as a very insecure practice. It actively encourages users to pick very short passwords and to type in passwords with very little attention to what they are doing. Furthermore, it offers multiple chances to those who might be watching behind your shoulders to try to decipher your password from your movements.

    Should another bug be opened for the documentation?

  13. 17 remaining items

  14. brittyazel commented on Apr 16, 2025

    @brittyazel

    This may be a little late to the party, but I can confirm this is also an issue over xRDP. I've tried with Mint, Ubuntu, and Rocky. I can also confirm that @brittyazel's fix of creating an override file works. My question is, why not just edit the /usr/share/polkit-1/rules.d/org.freedesktop.Flatpak.rules file, instead of creating an override file? What is the order of file processing and what benefit does creating an override file give?

    It is bad form to edit the files in /usr/ directly as those files are provided by the upstream package/distribution and any edits to these files will, depending on the package manager, either be overwritten on an update or you may inadvertently lock yourself from ever getting an updated version of the file. Basically, it's dangerous to edit the files in /usr/ and you shouldn't do it, even though you can.

    Generally speaking, configurations and rules defined in /etc/ will take precedence over the default rules found in /usr/. So if you need to modify a config or a rule found in /usr/, the best way to do so is to create the override file in /etc/. This is true for many, many software packages, i.e. systemd, polkit, openssh, pipewire, etc. That being said, there is nuance to how different configurations are handled for each software package, but overall the theme of /usr/ being off-limits and /etc/ being writable holds true.

  15. bnosie commented on Apr 16, 2025

    @bnosie

    Generally speaking, configurations and rules defined in /etc/ will take precedence over the default rules found in /usr/. So if you need to modify a config or a rule found in /usr/, the best way to do so is to create the override file in /etc/. This is true for many, many software packages, i.e. systemd, polkit, openssh, pipewire, etc. That being said, there is nuance to how different configurations are handled for each software package, but overall the theme of /usr/ being off-limits and /etc/ being writable holds true.

    Thanks for the explanation, makes good sense.

  16. fontypete commented on Jun 16, 2025

    @fontypete

    How TF can we expect people to adopt Linux when we present them with things like this? Do you think I can say to my son "Here's Linux, it's great. But every time you update something whose developers decided to use Flatpack rather than a nice simple .deb you're going to be asked to give your password 50 times"? No wonder he's using a Mac.

    Flatpack seems to be another GRUB: We had something that worked well in 99.9% of cases and needed a bicycle permit to use it. Now we have something mega complicated that you need F37 pilot's training for, to satisfy the 0.1% of cases and so some FOSS developers can get orgasms thinking how brilliant they are. Who cares whether you run the command from ssh,a terminal or a GUI.

    There should be absolutely no reason for any system to request a password more than once IN ANY CIRCUMSTANCES for any adjoined collection of operations. Flatpack upgrade is "an adjoined collection of operations" in this case.

    When you can show that Flatpack is more useful than Snap (which is scaping the bottom of the cesspit) you'll have at least done that. For the moment, Flatpack is a class one pain in the butt.

  17. callegar commented on Jun 16, 2025

    @callegar

    As mentioned before, the biggest issue here is actively training users to type in passwords with little or no attention. Should one be able to craft things so that among those 10 password requests or immediately after them a password is asked for something totally unrelated and hazardous, the disaster is easy to foresee.

    Yet, there is now know and relatively easy recipe to locally modify the setup and prevent the issue.

  18. lukaszsobala commented on Jun 16, 2025

    @lukaszsobala

    It is even worse - to maintain my sanity I just copy the password to the clipboard and paste it instead of typing the same thing over and over. I do not know why the workaround did not work for me, I will retry it and if it still does not, I don't think this is closed. To be honest, I wouldn't consider it closed until there is an easy way for the user to fix this, instead of manually modifying obscure config files. Flatpaks are meant to be "easy", don't they?
    EDIT: can confirm, the override works, it was my pasting mistake.

  19. callegar commented on Jul 14, 2025

    @callegar

    Funny enough, on an ssh session, flatpak asks for the password twice even right after having declared "Looking for updates… Nothing to do." Asking permission to do nothing is already interesting. Asking again to be 100% sure of being allowed to do nothing is even more. Question is what flatpak would do if permission to do nothing is negated ;-)

  20. zeroepoch commented on Jul 23, 2025

    @zeroepoch

    The fix mentioned here does not work on Fedora 41 Flatpak.. Still getting prompted multiple times, once for each item on the update list.. ==== AUTHENTICATING FOR org.freedesktop.Flatpak.modify-repo ==== Authentication is required to modify a system repository Authenticating as: RG (rgadsdon)

    • As this discussion is marked 'Closed' I will raise this as a new issue..

    For Fedora take a look at this other open issue, #4267 (comment)

    Essentially it's a different action that is being triggered causing the prompts (org.freedesktop.Flatpak.metadata-update). I thought the rule I added wasn't working until I noticed the action didn't match any of those mentioned above in this issue.

  21. honduken commented on Nov 17, 2025

    @honduken

    Just happened to me, connection over RDP, asked for password 10 times to install 1 app. So basically what I'm reading here is if I were to log in normally (through x session or whatever the default is) this wouldn't be an issue but because im logging in through XRDP it's going to ask me constantly.

  22. lukaszsobala commented on Nov 21, 2025

    @lukaszsobala

    The workaround still works. However, as @callegar said, after it is done updating everything, it actually STILL asks for the password (for me it was once) when there is nothing to do. And as far as I can observe, the operation is successful no matter if you give the password or not. So this is definitely still not solved, this is a bug. This behavior makes no sense.

  23. Kurizek27 commented on Dec 18, 2025

    @Kurizek27

    i just found out you can just log in as root (in the remote location) and it wont ask you for your password a million times

  24. k4cus commented on Apr 15, 2026

    @k4cus
  25. locked and limited conversation to collaborators on Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions