#credentials #bitwarden #cargo #cargo-registry #provider #auth-token #vault

app cargo-credential-bitwarden

A Cargo credential process that stores tokens in a Bitwarden vault

1 unstable release

0.1.0 May 19, 2024

#364 in Authentication

MIT/Apache

16KB
339 lines

cargo-credential-bitwarden

A Cargo credential provider for Bitwarden.

This crate borrows heavily from the cargo-credential-1password crate.

Usage

cargo-credential-bitwarden uses the Bitwarden bw CLI to store the token. You must install the bw CLI from the Bitwarden website.

Afterward you need to configure cargo to use cargo-credential-bitwarden as the credential provider. You can do this by adding something like the following to your cargo config file:

[registry]
global-credential-providers = ["cargo-credential-bitwarden --sync"]

Finally, run cargo login to save your registry token in Bitwarden.

CLI Arguments

cargo-credential-bitwarden supports the following command-line arguments:

  • --email: The email address used to login.
  • --sync: Automatically sync the local vault before getting the credential and automatically sync when the credential gets updated.

Dependencies

~3–11MB
~121K SLoC