-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #12994 - ehuss:beta-1pass, r=weihanglo
[beta 1.75] Backport 1password fixes This backports these fixes to 1.75 for the cargo-credential-1password helper. I'd like to publish these fixes and get the docs updated sooner rather than later. Unfortunately it uses an unpublished version of cargo-credential, so I can't publish directly from master. Backports: * #12985 — cargo-credential-1password: Add missing `--account` argument to `op signin` command * #12986 — cargo-credential-1password: Fix README
- Loading branch information
Showing
5 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,31 @@ | |
|
||
A Cargo [credential provider] for [1password]. | ||
|
||
`cargo-credential-1password` uses the 1password `op` CLI to store the token. You must | ||
install the `op` CLI from the [1password | ||
website](https://1password.com/downloads/command-line/). You must run `op signin` | ||
at least once with the appropriate arguments (such as `op signin my.1password.com [email protected]`), | ||
unless you provide the sign-in-address and email arguments. The master password will be required on each request | ||
unless the appropriate `OP_SESSION` environment variable is set. It supports | ||
the following command-line arguments: | ||
* `--account`: The account shorthand name to use. | ||
* `--vault`: The vault name to use. | ||
* `--sign-in-address`: The sign-in-address, which is a web address such as `my.1password.com`. | ||
* `--email`: The email address to sign in with. | ||
## Usage | ||
|
||
`cargo-credential-1password` uses the 1password `op` CLI to store the token. You | ||
must install the `op` CLI from the [1password | ||
website](https://1password.com/downloads/command-line/). | ||
|
||
Afterward you need to configure `cargo` to use `cargo-credential-1password` as | ||
the credential provider. You can do this by adding something like the following | ||
to your [cargo config file][credential provider]: | ||
|
||
```toml | ||
[registry] | ||
global-credential-providers = ["cargo-credential-1password --account my.1password.com"] | ||
``` | ||
|
||
Finally, run `cargo login` to save your registry token in 1password. | ||
|
||
## CLI Arguments | ||
|
||
`cargo-credential-1password` supports the following command-line arguments: | ||
|
||
* `--account`: The account name to use. For a list of available accounts, | ||
run `op account list`. | ||
* `--vault`: The vault name to use. For a list of available vaults, | ||
run `op vault list`. | ||
|
||
[1password]: https://1password.com/ | ||
[credential provider]: https://doc.rust-lang.org/nightly/cargo/reference/registry-authentication.html | ||
[credential provider]: https://doc.rust-lang.org/stable/cargo/reference/registry-authentication.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters