Skip to content

Commit

Permalink
feat(cli): Added example to --help output for bcrypt (argoproj#15838)
Browse files Browse the repository at this point in the history
* feat: Added example to --help output for bcrypt

Signed-off-by: abalaraj <[email protected]>

* feat: Added example to --help output for bcrypt

Signed-off-by: abalaraj <[email protected]>

---------

Signed-off-by: abalaraj <[email protected]>
  • Loading branch information
akashbalaraj authored and vladfr committed Dec 13, 2023
1 parent edbb453 commit 864bc63
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/argocd/commands/bcrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ func NewBcryptCmd() *cobra.Command {
)
var bcryptCmd = &cobra.Command{
Use: "bcrypt",
Short: "Generate bcrypt hash for the admin password",
Short: "Generate bcrypt hash for any password",
Example: `# Generate bcrypt hash for any password
argocd account bcrypt --password YOUR_PASSWORD`,
Run: func(cmd *cobra.Command, args []string) {
bytePassword := []byte(password)
// Hashing the password
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/commands/argocd_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ argocd account [flags]
### SEE ALSO

* [argocd](argocd.md) - argocd controls a Argo CD server
* [argocd account bcrypt](argocd_account_bcrypt.md) - Generate bcrypt hash for the admin password
* [argocd account bcrypt](argocd_account_bcrypt.md) - Generate bcrypt hash for any password
* [argocd account can-i](argocd_account_can-i.md) - Can I
* [argocd account delete-token](argocd_account_delete-token.md) - Deletes account token
* [argocd account generate-token](argocd_account_generate-token.md) - Generate account token
Expand Down
9 changes: 8 additions & 1 deletion docs/user-guide/commands/argocd_account_bcrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@

## argocd account bcrypt

Generate bcrypt hash for the admin password
Generate bcrypt hash for any password

```
argocd account bcrypt [flags]
```

### Examples

```
# Generate bcrypt hash for any password
argocd account bcrypt --password YOUR_PASSWORD
```

### Options

```
Expand Down

0 comments on commit 864bc63

Please sign in to comment.