uplink: encryption key setup (#414)
This commit is contained in:
parent
d10554eb8c
commit
d8c0f18059
@ -4,7 +4,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
@ -48,7 +47,8 @@ func cmdRun(cmd *cobra.Command, args []string) (err error) {
|
||||
|
||||
_, _, err = bs.List(ctx, "", "", 0)
|
||||
if err != nil {
|
||||
return errors.New("uplink setup error")
|
||||
return fmt.Errorf("Failed to contact Satellite.\n"+
|
||||
"Perhaps your configuration is invalid?\n%s", err)
|
||||
}
|
||||
|
||||
return cfg.Run(process.Ctx(cmd))
|
||||
|
@ -30,6 +30,7 @@ var (
|
||||
Overwrite bool `default:"false" help:"whether to overwrite pre-existing configuration files"`
|
||||
SatelliteAddr string `default:"localhost:7778" help:"the address to use for the satellite"`
|
||||
APIKey string `default:"" help:"the api key to use for the satellite"`
|
||||
EncKey string `default:"" help:"your root encryption key"`
|
||||
}
|
||||
)
|
||||
|
||||
@ -89,6 +90,7 @@ func cmdSetup(cmd *cobra.Command, args []string) (err error) {
|
||||
"overlay-addr": setupCfg.SatelliteAddr,
|
||||
"access-key": accessKey,
|
||||
"secret-key": secretKey,
|
||||
"enc-key": setupCfg.EncKey,
|
||||
}
|
||||
|
||||
return process.SaveConfig(runCmd.Flags(),
|
||||
|
Loading…
Reference in New Issue
Block a user