Skip to content

Commit 1759fd9

Browse files
committed
stoclient: improve config-init experience a bit
1 parent b7a4388 commit 1759fd9

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

docs/data-interfaces/client/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ file: /home/joonas/varastoclient-config.json
5555

5656
Running `$ sto config-init` without any arguments will give you instructions.
5757

58+
You'll find `authToken` under `Web UI > Users > API keys`
59+
60+
After you've run `config-init` successfully, run `config-print` again to check config's
61+
validity and what it contains.
62+
63+
!!! tip
64+
You'll have to change `tls_insecure_skip_validation` to `true`, unless you'll have
65+
configured a custom SSL certificate.
66+
5867

5968
How does the cloning interface look like?
6069
-----------------------------------------

pkg/stoclient/config.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ func ConfigFilePath() (string, error) {
9393
func configInitEntrypoint() *cobra.Command {
9494
return &cobra.Command{
9595
Use: "config-init [serverAddr] [authToken] [fuseMountPath]",
96-
Short: "Initialize configuration, use https://localhost for dev",
97-
Args: cobra.ExactArgs(3),
96+
Short: "Initialize configuration (helps writing JSON file)",
97+
Long: ` serverAddr looks like https://localhost
98+
authToken looks like dTPM59uxWm_uloW4...
99+
fuseMountPath looks like /mnt/varasto/stofuse OR leave it as empty ("")`,
100+
Args: cobra.ExactArgs(3),
98101
Run: func(cmd *cobra.Command, args []string) {
99102
serverAddr := args[0]
100103
authToken := args[1]

0 commit comments

Comments
 (0)