The build of Alpine available in the AUR does not support saving your password to disk. While reasonable from a security perspective, it gets pretty annoying. In my case, I use Gmail with 2FA and I have to enter the app password every time I want to check my email.

You can avoid this by creating a passfile for Alpine to use – in order to make the AUR Alpine use one, you must build it with the flag --with-passfile=FILENAME, where you can use any filename.

  1. Clone the AUR git repository, cd into the directory.
  2. Edit the PKGBUILD. In the build() function, replace the flag --without-passfile with --with-passfile=FILENAME.
  3. Run makepkg -si in the directory to build and install Alpine.
$ git clone https://aur.archlinux.org/alpine.git
$ cd alpine
alpine$ vim PKGBUILD
alpine$ // edit as described
alpine$ makepkg -si

The next time you open Alpine and enter your password, you will be prompted whether to save it on disk. Choose yes, enter a master password, and voilà. :)


References: