← retour aux snippets

pass: gérer des secrets en ligne de commande

Initialiser un magasin de mots de passe (GPG), stocker et récupérer des secrets.

bash security #pass#password-store#gpg

objectif

Centraliser des secrets chiffrés pour scripts et humains.

code minimal

pass init 'Alice <alice@data.pm>'
pass insert infrastructure/db-password

utilisation

# récupérer dans une variable
DB_PW=$(pass infrastructure/db-password)

variante(s) utile(s)

# générer un mot de passe
pass generate infra/api-key 32

notes

  • repose sur GPG; clés et agent nécessaires.
  • des extensions existent (git sync, OTP).