Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended config ? #73

Open
MichaelMure opened this issue Jul 26, 2020 · 3 comments
Open

Recommended config ? #73

MichaelMure opened this issue Jul 26, 2020 · 3 comments

Comments

@MichaelMure
Copy link

I found that at the moment, choosing the values for the config is fairly hard. It requires to spend a good amount of time reading the code to see what backend do with what, understand the default values, understand in what situation which backend is available ...

It would be very helpful I think if you could:

  • provide a recommended configuration in the Readme
  • say in Config's doc what backend use the value and what the default is
  • maybe have a table in the Readme that say which backend are active depending on the system ?
@MichaelMure
Copy link
Author

Also, KeychainSynchronizable and KeychainAccessibleWhenUnlocked seems to not do anything ?

@MichaelMure
Copy link
Author

This is what I came up with, would that make sense?

func defaultKeyring() (Keyring, error) {
	ucd, err := os.UserConfigDir()
	if err != nil {
		return nil, err
	}

	return keyring.Open(keyring.Config{
		ServiceName: "git-bug",

		// MacOS keychain
		KeychainName:             "git-bug",
		KeychainTrustApplication: true,

		// KDE Wallet
		KWalletAppID:  "git-bug",
		KWalletFolder: "git-bug",

		// Windows
		WinCredPrefix: "git-bug",

		// freedesktop.org's Secret Service
		LibSecretCollectionName: "git-bug",

		// Pass (https://www.passwordstore.org/)
		PassPrefix: "git-bug",

		// Fallback encrypted file
		FileDir:          path.Join(ucd, "git-bug", "keyring"),
		FilePasswordFunc: passwordPrompt,
	})
}

@jsoneaday
Copy link

I totally agree. Do you know what the configs are for doing encrypted file saves?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants