A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/orgrim/pg_back/commit/e1f59985f3a4ea180a3154086398ff9d9ab6aded below:

reword options for cipher passphrase · orgrim/pg_back@e1f5998 · GitHub

File tree Expand file treeCollapse file tree 4 files changed

+6

-6

lines changed

Filter options

Expand file treeCollapse file tree 4 files changed

+6

-6

lines changed Original file line number Diff line number Diff line change

@@ -144,7 +144,7 @@ All the files procuded by a run of pg_back can be encrypted using age

144 144

(<https://age-encryption.org/> an easy to use tool that does authenticated

145 145

encryption of files). To keep things simple, encryption is done using a

146 146

passphrase. To encrypt files, use the `--encrypt` option along with the

147 -

`--cipher-pass` option or `PGBK_PASSPHRASE` environment variable to specify the

147 +

`--cipher-pass` option or `PGBK_CIPHER_PASS` environment variable to specify the

148 148

passphrase. When `encrypt` is set to true in the configuration file, the

149 149

`--no-encrypt` option allows to disable encryption on the command line. By

150 150

default, unencrypted source files are removed when they are successfully

Original file line number Diff line number Diff line change

@@ -317,7 +317,7 @@ func parseCli(args []string) (options, []string, error) {

317 317

changed = append(changed, "with-templates")

318 318

}

319 319 320 -

// To override cipher = true from the config file on the command line,

320 +

// To override encrypt = true from the config file on the command line,

321 321

// have MergeCliAndConfigOptions() use the false value

322 322

if *NoEncrypt {

323 323

opts.Encrypt = false

@@ -462,7 +462,7 @@ func loadConfigurationFile(path string) (options, error) {

462 462

opts.PreHook = s.Key("pre_backup_hook").MustString("")

463 463

opts.PostHook = s.Key("post_backup_hook").MustString("")

464 464

opts.Encrypt = s.Key("encrypt").MustBool(false)

465 -

opts.CipherPassphrase = s.Key("cipher_passphrase").MustString("")

465 +

opts.CipherPassphrase = s.Key("cipher_pass").MustString("")

466 466

opts.EncryptKeepSrc = s.Key("encrypt_keep_source").MustBool(false)

467 467 468 468

opts.Upload = s.Key("upload").MustString("none")

Original file line number Diff line number Diff line change

@@ -161,7 +161,7 @@ func run() (retVal error) {

161 161

// Ensure a non-empty passphrase is set when asking for encryption

162 162

if (opts.Encrypt || opts.Decrypt) && len(opts.CipherPassphrase) == 0 {

163 163

// Fallback on the environment

164 -

opts.CipherPassphrase = os.Getenv("PGBK_PASSPHRASE")

164 +

opts.CipherPassphrase = os.Getenv("PGBK_CIPHER_PASS")

165 165 166 166

if len(opts.CipherPassphrase) == 0 {

167 167

return fmt.Errorf("cannot use an empty passphrase for encryption")

Original file line number Diff line number Diff line change

@@ -57,9 +57,9 @@ checksum_algorithm = none

57 57

# Encrypt the files produced, including globals and configuration.

58 58

encrypt = false

59 59 60 -

# Passphrase to use for encryption and decryption. The PGBK_PASSPHRASE

60 +

# Passphrase to use for encryption and decryption. The PGBK_CIPHER_PASS

61 61

# environment variable can be used alternatively.

62 -

cipher_passphrase =

62 +

cipher_pass =

63 63 64 64

# Keep orignal files after encrypting them.

65 65

encrypt_keep_source = false

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4