File tree Expand file tree Collapse file tree 5 files changed +37
-17
lines changed Expand file tree Collapse file tree 5 files changed +37
-17
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,10 @@ A more secure way is to let the CLI prompt you for the passphrase when needed.
106
106
antij wallet create --ask-passphrase
107
107
```
108
108
109
- If you set the ` ANTI_INTERACTIVE_PASSWORD ` environment variable to any value, the CLI will prompt you for the passphrase every time it needs it.
109
+ If you set the ` ANTI_INTERACTIVE_SECRETS ` environment variable to any value, the CLI will prompt you for the passphrase every time it needs it.
110
110
111
111
``` bash
112
- export ANTI_INTERACTIVE_PASSWORD =1
112
+ export ANTI_INTERACTIVE_SECRETS =1
113
113
```
114
114
115
115
You can review this wallet info anytime with
Original file line number Diff line number Diff line change @@ -116,13 +116,13 @@ Before proceding be careful to set the necessary signing assets in your environm
116
116
As with the wallet passphrase you can set the password in the environment variable
117
117
118
118
` ` ` bash
119
- read -s -p " Enter password to decrypt the SSH private key: " ANTI_INTERACTIVE_PASSWORD
120
- export ANTI_INTERACTIVE_PASSWORD
119
+ read -s -p " Enter password to decrypt the SSH private key: " ANTI_INTERACTIVE_SECRETS
120
+ export ANTI_INTERACTIVE_SECRETS
121
121
` ` `
122
122
123
123
Or better paste it from a password manager each time you need it using the ' ask-password' option
124
124
125
- Or set the ` ANTI_INTERACTIVE_PASSWORD ` environment variable to any value.
125
+ Or set the ` ANTI_INTERACTIVE_SECRETS ` environment variable to any value.
126
126
127
127
> The file at ANTI_SSH_FILE path has to be the encrypted ssh private key matching the user registration [see above](# registering-a-user-public-key).
128
128
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import OptEnvConf
32
32
, setting
33
33
, short
34
34
, str
35
+ , switch
35
36
, withConfig
36
37
)
37
38
import System.Console.Haskeline
@@ -57,13 +58,18 @@ walletPassphraseCommon =
57
58
mapIO id
58
59
$ setting
59
60
[ help " Prompt for the passphrase for the encrypted mnemonics"
60
- , env " ANTI_INTERACTIVE_PASSWORD "
61
+ , env " ANTI_INTERACTIVE_SECRETS "
61
62
, metavar " NONE"
62
- , long " ask-passphrase"
63
- , option
64
63
, reader
65
64
$ str @ String $> queryConsole " Enter passphrase for encrypted mnemonics"
66
65
]
66
+ <|> setting
67
+ [ help " Prompt for the passphrase for the encrypted mnemonics"
68
+ , metavar " NONE"
69
+ , long " ask-wallet-passphrase"
70
+ , switch
71
+ $ queryConsole " Enter passphrase for encrypted mnemonics"
72
+ ]
67
73
<|> setting
68
74
[ env " ANTI_WALLET_PASSPHRASE"
69
75
, metavar " PASSPHRASE"
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ import OptEnvConf
47
47
, runParser
48
48
, setting
49
49
, str
50
+ , switch
50
51
, (<|>)
51
52
)
52
53
import Oracle.Options (oracleCommandParser )
@@ -64,15 +65,22 @@ githubAuthOption =
64
65
$ mapIO id
65
66
$ setting
66
67
[ help " Prompt for the passphrase for the encrypted mnemonics"
67
- , env " ANTI_INTERACTIVE_PASSWORD "
68
+ , env " ANTI_INTERACTIVE_SECRETS "
68
69
, metavar " NONE"
69
- , long " ask-passphrase"
70
- , option
71
70
, reader
72
- $ str @ String
71
+ ( str @ String
73
72
$> ( T. encodeUtf8
74
- <$> queryConsole " Enter your GitHub personal access token: "
73
+ <$> queryConsole " Enter your GitHub personal access token"
75
74
)
75
+ )
76
+ ]
77
+ <|> setting
78
+ [ help " Prompt for the passphrase for the encrypted mnemonics"
79
+ , metavar " NONE"
80
+ , long " ask-github-pat"
81
+ , switch
82
+ $ T. encodeUtf8
83
+ <$> queryConsole " Enter your GitHub personal access token"
76
84
]
77
85
<|> setting
78
86
[ env " ANTI_GITHUB_PAT"
Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ import OptEnvConf
34
34
, long
35
35
, mapIO
36
36
, metavar
37
- , option
38
37
, reader
39
38
, setting
40
39
, str
40
+ , switch
41
41
, (<|>)
42
42
)
43
43
import Oracle.Validate.Requests.RegisterRole
@@ -160,16 +160,22 @@ keyPasswordOption =
160
160
mapIO id
161
161
$ setting
162
162
[ help " Prompt for the password to decrypt the SSH private key"
163
- , env " ANTI_INTERACTIVE_PASSWORD "
163
+ , env " ANTI_INTERACTIVE_SECRETS "
164
164
, metavar " NONE"
165
- , long " ask-password"
166
- , option
167
165
, reader
168
166
$ str @ String
169
167
$> ( T. unpack
170
168
<$> queryConsole " Enter password for SSH private key"
171
169
)
172
170
]
171
+ <|> setting
172
+ [ help " Prompt for the password to decrypt the SSH private key"
173
+ , metavar " NONE"
174
+ , long " ask-ssh-password"
175
+ , switch
176
+ $ T. unpack
177
+ <$> queryConsole " Enter password for SSH private key"
178
+ ]
173
179
<|> setting
174
180
[ env " ANTI_SSH_PASSWORD"
175
181
, help " Password to the decrypt the SSH private key"
You can’t perform that action at this time.
0 commit comments