I guess ~/.config (XDG_CONFIG_HOME) is not correct because that way users have to be constantly aware which files are safe to commit to their dotfiles repository.

2 Answers 2


Why not put it next to your SSH key in ~/.ssh? Sounds like it serves kind of the same purpose.

Alternatively, you could use something like Hashicorp Vault to store secrets.


have a look at the freedesktop.org's Secret Storage Spec (Version 0.2 Working Draft)

This way you can have the credentials saved in a keyring that is unlocked when the user logs in.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .