#credentials #bitwarden #cargo #vault #provider #token #store

app cargo-credential-bitwarden

A Cargo credential process that stores tokens in a Bitwarden vault

1 unstable release

0.1.0 May 19, 2024

#109 in Authentication

Download history 139/week @ 2024-05-14 35/week @ 2024-05-21 1/week @ 2024-06-04

175 downloads per month

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–12MB
~124K SLoC