diff --git a/README.md b/README.md index e40d5e6ebe..4639d235d1 100644 --- a/README.md +++ b/README.md @@ -566,20 +566,12 @@ There are several configuration options available through the command line inter | **Option** | *Type* | Description | | ------------- | --------- | ----------- | -| `alwaystrust` | `bool` | Always trust public keys when encrypting. This trades some security against easier use. Use with caution. | | `askformore` | `bool` | If enabled - it will ask to add more data after use of `generate` command. | | `autoimport` | `bool` | Import missing keys stored in the pass repo (see `persistkeys`) without asking. | -| `autopull` | `bool` | Always do a `git pull` before a `git push`. Reduces the chance of git rejections. | -| `autopush` | `bool` | Always do a `git push` after a commit to the store. Makes sure your local changes are always available on your git remote. | +| `autosync` | `bool` | Always do a `git push` after a commit to the store. Makes sure your local changes are always available on your git remote. | | `cliptimeout` | `int` | How many seconds the secret is stored when using `-c`. | -| `gitrecurse` | `bool` | Automatically recurse any git operation to mounted sub-stores? | -| `loadkeys` | `bool` | Import missing keys store in the pass repo (see `persistkeys` and `autoimport`). | -| `debug` | `bool` | Enable debug output. | -| `nocolor` | `bool` | Disable colored output even on terminals. | | `noconfirm` | `bool` | Do not confirm recipient list when encrypting. | -| `nopager` | `bool` | Disable the pager feature when printing multi-page output. | | `path` | `string` | Path to the root store. | -| `persistkeys` | `bool` | Store every recipients public keys in the store. Makes it easier to set up an new machine or user. | | `safecontent` | `bool` | Only output _safe content_ (i.e. everything but the first line of a secret) to the terminal. Use _copy_ (`-c`) to retrieve the password in the clipboard. | ## Environment Variables diff --git a/action/action.go b/action/action.go index bbce239fbe..46f9db6720 100644 --- a/action/action.go +++ b/action/action.go @@ -92,7 +92,7 @@ func New(sv semver.Version) *Action { act.gpg = gpgcli.New(gpgcli.Config{ Debug: cfg.Debug, - AlwaysTrust: cfg.AlwaysTrust, + AlwaysTrust: true, }) return act diff --git a/action/git.go b/action/git.go index 5d6b3f83c0..788cee21d8 100644 --- a/action/git.go +++ b/action/git.go @@ -10,9 +10,9 @@ import ( // Git runs git commands inside the store or mounts func (s *Action) Git(c *cli.Context) error { store := c.String("store") - recurse := s.Store.GitRecurse() - if c.IsSet("recurse") { - recurse = c.Bool("recurse") + recurse := true + if c.IsSet("no-recurse") { + recurse = !c.Bool("no-recurse") } force := c.Bool("force") return s.Store.Git(store, recurse, force, c.Args()...) diff --git a/config/config.go b/config/config.go index 85daa47ea6..c3daf5957a 100644 --- a/config/config.go +++ b/config/config.go @@ -23,47 +23,32 @@ var ( // Config is the gopass config structure type Config struct { - AlwaysTrust bool `json:"alwaystrust"` // always trust public keys when encrypting - AskForMore bool `json:"askformore"` // ask for more data on generate - AutoImport bool `json:"autoimport"` // import missing public keys w/o asking - AutoPull bool `json:"autopull"` // pull from git before push - AutoPush bool `json:"autopush"` // push to git remote after commit - CheckRecipients bool `json:"checkrecipients"` // only encrypt to valid recipients - ClipTimeout int `json:"cliptimeout"` // clear clipboard after seconds - Debug bool `json:"debug"` // enable debug output - FsckFunc store.FsckCallback `json:"-"` - GitRecurse bool `json:"gitrecurse"` - ImportFunc store.ImportCallback `json:"-"` - LoadKeys bool `json:"loadkeys"` // load missing keys from store - Mounts map[string]string `json:"mounts,omitempty"` - NoColor bool `json:"nocolor"` // disable colors in output - NoConfirm bool `json:"noconfirm"` // do not confirm recipients when encrypting - NoPager bool `json:"nopager"` // do not start a pager for longer output - Path string `json:"path"` // path to the root store - PersistKeys bool `json:"persistkeys"` // store recipient keys in store - SafeContent bool `json:"safecontent"` // avoid showing passwords in terminal - Version string `json:"version"` + AskForMore bool `json:"askformore"` // ask for more data on generate + AutoImport bool `json:"autoimport"` // import missing public keys w/o asking + AutoSync bool `json:"autosync"` // push to git remote after commit, pull before push if necessary + ClipTimeout int `json:"cliptimeout"` // clear clipboard after seconds + Debug bool `json:"-"` + FsckFunc store.FsckCallback `json:"-"` + ImportFunc store.ImportCallback `json:"-"` + Mounts map[string]string `json:"mounts,omitempty"` + NoColor bool `json:"-"` + NoPager bool `json:"-"` + NoConfirm bool `json:"noconfirm"` // do not confirm recipients when encrypting + Path string `json:"path"` // path to the root store + SafeContent bool `json:"safecontent"` // avoid showing passwords in terminal + Version string `json:"version"` } // New creates a new config with sane default values func New() *Config { return &Config{ - AlwaysTrust: true, - AskForMore: false, - AutoImport: true, - AutoPull: true, - AutoPush: true, - CheckRecipients: true, - ClipTimeout: 45, - Debug: false, - GitRecurse: true, - LoadKeys: true, - Mounts: make(map[string]string), - NoColor: false, - NoConfirm: false, - NoPager: false, - PersistKeys: true, - SafeContent: false, + AskForMore: false, + AutoImport: true, + ClipTimeout: 45, + Mounts: make(map[string]string), + NoConfirm: false, + SafeContent: false, + Version: "", } } diff --git a/main.go b/main.go index ea96942a9b..af524aff45 100644 --- a/main.go +++ b/main.go @@ -305,8 +305,8 @@ func main() { Usage: "Store to operate on", }, cli.BoolFlag{ - Name: "recurse, r", - Usage: "Recurse to mounted sub-stores", + Name: "no-recurse, n", + Usage: "Do not recurse to mounted sub-stores", }, cli.BoolFlag{ Name: "force, f", diff --git a/store/root/config.go b/store/root/config.go index 65e6f4821f..fbe1e2636e 100644 --- a/store/root/config.go +++ b/store/root/config.go @@ -9,24 +9,18 @@ import ( // Config returns this root stores config as a config struct func (s *Store) Config() *config.Config { c := &config.Config{ - AlwaysTrust: s.alwaysTrust, - AskForMore: s.askForMore, - AutoImport: s.autoImport, - AutoPull: s.autoPull, - AutoPush: s.autoPush, - CheckRecipients: s.checkRecipients, - ClipTimeout: s.clipTimeout, - Debug: s.debug, - GitRecurse: s.gitRecurse, - LoadKeys: s.loadKeys, - Mounts: make(map[string]string, len(s.mounts)), - NoColor: s.noColor, - NoConfirm: s.noConfirm, - NoPager: s.noPager, - Path: s.path, - PersistKeys: s.persistKeys, - SafeContent: s.safeContent, - Version: s.version, + AskForMore: s.askForMore, + AutoImport: s.autoImport, + AutoSync: s.autoSync, + ClipTimeout: s.clipTimeout, + Debug: s.debug, + Mounts: make(map[string]string, len(s.mounts)), + NoColor: s.noColor, + NoConfirm: s.noConfirm, + NoPager: s.noPager, + Path: s.path, + SafeContent: s.safeContent, + Version: s.version, } for alias, sub := range s.mounts { c.Mounts[alias] = sub.Path() @@ -40,21 +34,15 @@ func (s *Store) UpdateConfig(cfg *config.Config) error { if cfg == nil { return fmt.Errorf("invalid config") } - s.alwaysTrust = cfg.AlwaysTrust s.askForMore = cfg.AskForMore s.autoImport = cfg.AutoImport - s.autoPull = cfg.AutoPull - s.autoPush = cfg.AutoPush - s.debug = cfg.Debug - s.checkRecipients = cfg.CheckRecipients + s.autoSync = cfg.AutoSync s.clipTimeout = cfg.ClipTimeout - s.gitRecurse = cfg.GitRecurse - s.loadKeys = cfg.LoadKeys + s.debug = cfg.Debug s.noColor = cfg.NoColor s.noConfirm = cfg.NoConfirm s.noPager = cfg.NoPager s.path = cfg.Path - s.persistKeys = cfg.PersistKeys s.safeContent = cfg.SafeContent // add any missing mounts @@ -89,24 +77,9 @@ func (s *Store) Alias() string { return "" } -// NoConfirm returns true if no recipients should be confirmed on encryption -func (s *Store) NoConfirm() bool { - return s.noConfirm -} - -// AutoPush returns the value of auto push -func (s *Store) AutoPush() bool { - return s.autoPush -} - -// AutoPull returns the value of auto pull -func (s *Store) AutoPull() bool { - return s.autoPull -} - -// AutoImport returns the value of auto import -func (s *Store) AutoImport() bool { - return s.autoImport +// AutoSync returns the value of auto sync +func (s *Store) AutoSync() bool { + return s.autoSync } // SafeContent returns the value of safe content @@ -129,7 +102,7 @@ func (s *Store) NoPager() bool { return s.noPager } -// GitRecurse returns true if we should recurse git operations to substores -func (s *Store) GitRecurse() bool { - return s.gitRecurse +// NoConfirm returns true if no recipients should be confirmed on encryption +func (s *Store) NoConfirm() bool { + return s.noConfirm } diff --git a/store/root/recipients.go b/store/root/recipients.go index 0526377699..19a104710a 100644 --- a/store/root/recipients.go +++ b/store/root/recipients.go @@ -42,10 +42,6 @@ func (r *Store) addRecipient(prefix string, root tree.Tree, recp string, pretty // ImportMissingPublicKeys import missing public keys in any substore func (r *Store) ImportMissingPublicKeys() error { - if !r.loadKeys { - return nil - } - for alias, sub := range r.mounts { if err := sub.ImportMissingPublicKeys(); err != nil { fmt.Println(color.RedString("[%s] Failed to import missing public keys: %s", alias, err)) @@ -58,10 +54,6 @@ func (r *Store) ImportMissingPublicKeys() error { // SaveRecipients persists the recipients to disk. Only useful if persist keys is // enabled func (r *Store) SaveRecipients() error { - if !r.persistKeys { - return nil - } - for alias, sub := range r.mounts { if err := sub.SaveRecipients(); err != nil { fmt.Println(color.RedString("[%s] Failed to save recipients: %s", alias, err)) diff --git a/store/root/store.go b/store/root/store.go index cf4b458ccf..50af25fcbf 100644 --- a/store/root/store.go +++ b/store/root/store.go @@ -21,28 +21,22 @@ type gpger interface { // Store is the public facing password store type Store struct { - alwaysTrust bool // always trust public keys when encrypting - askForMore bool - autoImport bool // import missing public keys w/o asking - autoPull bool // pull from git before push - autoPush bool // push to git remote after commit - checkRecipients bool - clipTimeout int // clear clipboard after seconds - debug bool - fsckFunc store.FsckCallback - gpg gpger - gitRecurse bool - importFunc store.ImportCallback - loadKeys bool // load missing keys from store - mounts map[string]*sub.Store - noColor bool // disable colors in output - noConfirm bool // do not confirm recipients when encrypting - noPager bool - path string // path to the root store - persistKeys bool // store recipient keys in store - safeContent bool // avoid showing passwords in terminal - store *sub.Store - version string + askForMore bool + autoImport bool + autoSync bool // push to git remote after commit + clipTimeout int // clear clipboard after seconds + debug bool + fsckFunc store.FsckCallback + gpg gpger + importFunc store.ImportCallback + mounts map[string]*sub.Store + noColor bool // disable colors in output + noConfirm bool + noPager bool + path string // path to the root store + safeContent bool // avoid showing passwords in terminal + store *sub.Store + version string } // New creates a new store @@ -54,28 +48,22 @@ func New(cfg *config.Config) (*Store, error) { return nil, fmt.Errorf("need path") } r := &Store{ - alwaysTrust: cfg.AlwaysTrust, - askForMore: cfg.AskForMore, - autoImport: cfg.AutoImport, - autoPull: cfg.AutoPull, - autoPush: cfg.AutoPush, - checkRecipients: cfg.CheckRecipients, - clipTimeout: cfg.ClipTimeout, - debug: cfg.Debug, - fsckFunc: cfg.FsckFunc, - gitRecurse: cfg.GitRecurse, + askForMore: cfg.AskForMore, + autoImport: cfg.AutoImport, + autoSync: cfg.AutoSync, + clipTimeout: cfg.ClipTimeout, + debug: cfg.Debug, + fsckFunc: cfg.FsckFunc, gpg: gpgcli.New(gpgcli.Config{ Debug: cfg.Debug, - AlwaysTrust: cfg.AlwaysTrust, + AlwaysTrust: true, }), importFunc: cfg.ImportFunc, - loadKeys: cfg.LoadKeys, mounts: make(map[string]*sub.Store, len(cfg.Mounts)), noColor: cfg.NoColor, noConfirm: cfg.NoConfirm, noPager: cfg.NoPager, path: cfg.Path, - persistKeys: cfg.PersistKeys, safeContent: cfg.SafeContent, } diff --git a/store/sub/config.go b/store/sub/config.go index f4629c507d..e600695d91 100644 --- a/store/sub/config.go +++ b/store/sub/config.go @@ -9,18 +9,12 @@ import ( // Config returns this sub stores config as a config struct func (s *Store) Config() *config.Config { c := &config.Config{ - AlwaysTrust: s.alwaysTrust, - AutoImport: s.autoImport, - AutoPull: s.autoPull, - AutoPush: s.autoPush, - CheckRecipients: s.checkRecipients, - Debug: s.debug, - FsckFunc: s.fsckFunc, - ImportFunc: s.importFunc, - LoadKeys: s.loadKeys, - Mounts: make(map[string]string), - Path: s.path, - PersistKeys: s.persistKeys, + AutoSync: s.autoSync, + AutoImport: s.autoImport, + FsckFunc: s.fsckFunc, + ImportFunc: s.importFunc, + Mounts: make(map[string]string), + Path: s.path, } return c } @@ -30,17 +24,11 @@ func (s *Store) UpdateConfig(cfg *config.Config) error { if cfg == nil { return fmt.Errorf("invalid config") } - s.alwaysTrust = cfg.AlwaysTrust s.autoImport = cfg.AutoImport - s.autoPull = cfg.AutoPull - s.autoPush = cfg.AutoPush - s.checkRecipients = cfg.CheckRecipients - s.debug = cfg.Debug + s.autoSync = cfg.AutoSync s.fsckFunc = cfg.FsckFunc s.importFunc = cfg.ImportFunc - s.loadKeys = cfg.LoadKeys s.path = cfg.Path - s.persistKeys = cfg.PersistKeys // substores have no mounts diff --git a/store/sub/git.go b/store/sub/git.go index bbe321c117..c0aa364c38 100644 --- a/store/sub/git.go +++ b/store/sub/git.go @@ -28,10 +28,7 @@ func (s *Store) gitCmd(name string, args ...string) error { return err } // load keys only after git pull - if s.debug { - fmt.Printf("[DEBUG] loadKeys: %t - cmd.Args: %+v\n", s.loadKeys, cmd.Args) - } - if s.loadKeys && len(cmd.Args) > 1 && cmd.Args[1] == "pull" { + if len(cmd.Args) > 1 && cmd.Args[1] == "pull" { if s.debug { fmt.Printf("[DEBUG] importing possilby missing keys ...\n") } @@ -218,10 +215,8 @@ func (s *Store) gitPush(remote, branch string) error { return store.ErrGitNoRemote } - if s.autoPull { - if err := s.Git("pull", remote, branch); err != nil { - fmt.Println(color.YellowString("Failed to pull before git push: %s", err)) - } + if err := s.Git("pull", remote, branch); err != nil { + fmt.Println(color.YellowString("Failed to pull before git push: %s", err)) } return s.Git("push", remote, branch) diff --git a/store/sub/recipients.go b/store/sub/recipients.go index 6cbbe4666b..a26758a2c0 100644 --- a/store/sub/recipients.go +++ b/store/sub/recipients.go @@ -160,25 +160,6 @@ func (s *Store) saveRecipients(msg string) error { } } - if !s.persistKeys { - // push to remote repo - if s.autoPush { - if err := s.gitPush("", ""); err != nil { - if err == store.ErrGitNotInit { - return nil - } - if err == store.ErrGitNoRemote { - msg := "Warning: git has no remote. Ignoring auto-push option\n" + - "Run: gopass git remote add origin ..." - fmt.Println(color.YellowString(msg)) - return nil - } - return err - } - } - return nil - } - // save recipients' public keys if err := os.MkdirAll(filepath.Join(s.path, keyDir), dirMode); err != nil { return err @@ -203,19 +184,17 @@ func (s *Store) saveRecipients(msg string) error { } // push to remote repo - if s.autoPush { - if err := s.gitPush("", ""); err != nil { - if err == store.ErrGitNotInit { - return nil - } - if err == store.ErrGitNoRemote { - msg := "Warning: git has not remote. Ignoring auto-push option\n" + - "Run: gopass git remote add origin ..." - fmt.Println(color.YellowString(msg)) - return nil - } - return err + if err := s.gitPush("", ""); err != nil { + if err == store.ErrGitNotInit { + return nil } + if err == store.ErrGitNoRemote { + msg := "Warning: git has not remote. Ignoring auto-push option\n" + + "Run: gopass git remote add origin ..." + fmt.Println(color.YellowString(msg)) + return nil + } + return err } return nil diff --git a/store/sub/recipients_test.go b/store/sub/recipients_test.go index 4076f1cfeb..bf79403edd 100644 --- a/store/sub/recipients_test.go +++ b/store/sub/recipients_test.go @@ -11,6 +11,7 @@ import ( "testing" "github.com/justwatchcom/gopass/config" + gpgmock "github.com/justwatchcom/gopass/gpg/mock" "github.com/stretchr/testify/assert" ) @@ -25,8 +26,12 @@ func TestLoadRecipients(t *testing.T) { genRecs, _, err := createStore(tempdir, nil, nil) assert.NoError(t, err) - s, err := New("", &config.Config{Path: tempdir}) - assert.NoError(t, err) + s := &Store{ + alias: "", + path: tempdir, + gpg: gpgmock.New(), + recipients: []string{"john.doe"}, + } recs, err := s.loadRecipients() assert.NoError(t, err) @@ -41,11 +46,16 @@ func TestSaveRecipients(t *testing.T) { defer func() { _ = os.RemoveAll(tempdir) }() - genRecs, _, err := createStore(tempdir, nil, nil) + _, _, err = createStore(tempdir, nil, nil) assert.NoError(t, err) - s, err := New("", &config.Config{Path: tempdir}) - assert.NoError(t, err) + recp := []string{"john.doe"} + s := &Store{ + alias: "", + path: tempdir, + gpg: gpgmock.New(), + recipients: recp, + } // remove recipients _ = os.Remove(filepath.Join(tempdir, GPGID)) @@ -65,13 +75,13 @@ func TestSaveRecipients(t *testing.T) { } sort.Strings(foundRecs) - for i := 0; i < len(genRecs); i++ { + for i := 0; i < len(recp); i++ { if i >= len(foundRecs) { t.Errorf("Read too few recipients") break } - if genRecs[i] != foundRecs[i] { - t.Errorf("Mismatch at %d: %s vs %s", i, genRecs[i], foundRecs[i]) + if recp[i] != foundRecs[i] { + t.Errorf("Mismatch at %d: %s vs %s", i, recp[i], foundRecs[i]) } } } @@ -84,24 +94,23 @@ func TestAddRecipient(t *testing.T) { defer func() { _ = os.RemoveAll(tempdir) }() - genRecs, _, err := createStore(tempdir, nil, nil) + _, _, err = createStore(tempdir, nil, nil) assert.NoError(t, err) - s, err := New("", &config.Config{Path: tempdir}) - assert.NoError(t, err) + s := &Store{ + alias: "", + path: tempdir, + gpg: gpgmock.New(), + recipients: []string{"john.doe"}, + } newRecp := "A3683834" - newFP := "1E52C1335AC1F4F4FE02F62AB5B44266A3683834" - - if os.Getenv("GOPASS_INTEGRATION_TESTS") != "true" { - t.Skip("Skipping test. GOPASS_INTEGRATION_TESTS is not true") - } err = s.AddRecipient(newRecp) if err != nil { t.Fatalf("Failed to add Recipient: %s", err) } - assert.Equal(t, append(genRecs, newFP), s.recipients) + assert.Equal(t, []string{"john.doe", newRecp}, s.recipients) } func TestRemoveRecipient(t *testing.T) { @@ -112,19 +121,19 @@ func TestRemoveRecipient(t *testing.T) { defer func() { _ = os.RemoveAll(tempdir) }() - genRecs, _, err := createStore(tempdir, nil, nil) - assert.NoError(t, err) - - s, err := New("", &config.Config{Path: tempdir}) + _, _, err = createStore(tempdir, nil, nil) assert.NoError(t, err) - if os.Getenv("GOPASS_INTEGRATION_TESTS") != "true" { - t.Skip("Skipping test. GOPASS_INTEGRATION_TESTS is not true") + s := &Store{ + alias: "", + path: tempdir, + gpg: gpgmock.New(), + recipients: []string{"john.doe"}, } - err = s.RemoveRecipient(genRecs[0]) + err = s.RemoveRecipient("john.doe") assert.NoError(t, err) - assert.Equal(t, genRecs[1:], s.recipients) + assert.Equal(t, []string{}, s.recipients) } func TestListRecipients(t *testing.T) { diff --git a/store/sub/store.go b/store/sub/store.go index 3d7b41c302..1fe64c47e8 100644 --- a/store/sub/store.go +++ b/store/sub/store.go @@ -36,20 +36,15 @@ type gpger interface { // Store is password store type Store struct { - alias string - alwaysTrust bool - autoImport bool - autoPull bool - autoPush bool - checkRecipients bool - debug bool - fsckFunc store.FsckCallback - importFunc store.ImportCallback - loadKeys bool - path string - persistKeys bool - recipients []string - gpg gpger + alias string + autoImport bool + autoSync bool + debug bool + fsckFunc store.FsckCallback + importFunc store.ImportCallback + path string + recipients []string + gpg gpger } // New creates a new store, copying settings from the given root store @@ -61,22 +56,17 @@ func New(alias string, cfg *config.Config) (*Store, error) { return nil, fmt.Errorf("Need path") } s := &Store{ - alias: alias, - alwaysTrust: cfg.AlwaysTrust, - autoImport: cfg.AutoImport, - autoPull: cfg.AutoPull, - autoPush: cfg.AutoPush, - checkRecipients: cfg.CheckRecipients, - debug: cfg.Debug, - fsckFunc: cfg.FsckFunc, - importFunc: cfg.ImportFunc, - loadKeys: cfg.LoadKeys, - path: cfg.Path, - persistKeys: cfg.PersistKeys, - recipients: make([]string, 0, 1), + alias: alias, + autoImport: cfg.AutoImport, + autoSync: cfg.AutoSync, + debug: cfg.Debug, + fsckFunc: cfg.FsckFunc, + importFunc: cfg.ImportFunc, + path: cfg.Path, + recipients: make([]string, 0, 1), gpg: gpgcli.New(gpgcli.Config{ Debug: cfg.Debug, - AlwaysTrust: cfg.AlwaysTrust, + AlwaysTrust: true, }), } @@ -284,10 +274,6 @@ func (s *Store) useableKeys() ([]string, error) { recipients := make([]string, len(s.recipients)) copy(recipients, s.recipients) - if !s.checkRecipients { - return recipients, nil - } - kl, err := s.gpg.FindPublicKeys(recipients...) if err != nil { return recipients, err @@ -348,7 +334,7 @@ func (s *Store) SetConfirm(name string, content []byte, reason string, cb store. return err } - if !s.autoPush { + if !s.autoSync { return nil } @@ -497,7 +483,7 @@ func (s *Store) delete(name string, recurse bool) error { return err } - if s.autoPush { + if s.autoSync { if err := s.gitPush("", ""); err != nil { if err == store.ErrGitNotInit || err == store.ErrGitNoRemote { return nil @@ -530,8 +516,8 @@ func (s *Store) reencrypt(reason string) error { return err } // save original value of auto push - gitAutoPush := s.autoPush - s.autoPush = false + gitAutoSync := s.autoSync + s.autoSync = false for _, e := range entries { content, err := s.Get(e) if err != nil { @@ -543,9 +529,9 @@ func (s *Store) reencrypt(reason string) error { } } // restore value of auto push - s.autoPush = gitAutoPush + s.autoSync = gitAutoSync - if s.autoPush { + if s.autoSync { if err := s.gitPush("", ""); err != nil { if err == store.ErrGitNotInit { msg := "Warning: git is not initialized for this store. Ignoring auto-push option\n" + diff --git a/tests/config_test.go b/tests/config_test.go index d5463d29f4..b20f7627bc 100644 --- a/tests/config_test.go +++ b/tests/config_test.go @@ -12,25 +12,19 @@ func TestConfig(t *testing.T) { out, err := ts.run("config") assert.NoError(t, err) - assert.Contains(t, out, "alwaystrust: true") + assert.Contains(t, out, "askformore: false") assert.Contains(t, out, "autoimport: true") - assert.Contains(t, out, "autopull: true") - assert.Contains(t, out, "autopush: true") + assert.Contains(t, out, "autosync: true") assert.Contains(t, out, "cliptimeout: 45") - assert.Contains(t, out, "loadkeys: true") assert.Contains(t, out, "noconfirm: true") - assert.Contains(t, out, "path: ") - assert.Contains(t, out, "persistkeys: true") + assert.Contains(t, out, "path: /tmp") assert.Contains(t, out, "safecontent: true") invertables := []string{ - "alwaystrust", + "askformore", "autoimport", - "autopull", - "autopush", - "loadkeys", + "autosync", "noconfirm", - "persistkeys", "safecontent", } diff --git a/tests/tester.go b/tests/tester.go index e198660e7b..a83658009d 100644 --- a/tests/tester.go +++ b/tests/tester.go @@ -16,14 +16,11 @@ import ( const ( gopassConfig = ` -alwaystrust: true +askformore: false autoimport: true -autopull: true -autopush: true +autosync: true cliptimeout: 45 -loadkeys: true noconfirm: true -persistkeys: true safecontent: true` keyID = "BE73F104" )