cargo-credential-pass

Crates.iocargo-credential-pass
lib.rscargo-credential-pass
version1.0.0
sourcesrc
created_at2024-08-01 22:47:49.175587
updated_at2024-09-02 21:15:08.305023
descriptionKeep your cargo registry tokens encrypted in your pass store
homepage
repositoryhttps://github.com/domodwyer/cargo-credential-pass
max_upload_size
id1322584
size46,733
Dom (domodwyer)

documentation

README

crates.io

cargo-credential-pass

A Cargo credential provider for pass.

  • No config needed1
  • Stores encrypted tokens in your password store with all your other secrets
  • Automatically encrypts using your password store GPG key
  • Works great with keys stored on HSMs too (hello YubiKey!)

Because no one likes plaintext credentials on disk :(

Use It

  1. Install cargo-credential-pass:
% cargo install --locked cargo-credential-pass
  1. Configure Cargo to use this credential provider:
[registry]
global-credential-providers = ["cargo-credential-pass"]
  1. Login! cargo login will pop up your editor - paste your registry token and close the window.

Your token will now be stored as an encrypted text file in $PASSWORD_STORE_DIR/cargo-registry/<registery-name>.token.

That's it - you're good to go!

Footnotes

  1. Kinda - just cargo!

Commit count: 0

cargo fmt