Giter Site home page Giter Site logo

Comments (3)

ncw avatar ncw commented on September 27, 2024

Hi @dzoep I've had a first go at this. The --password-command is now used when setting and changing the config password.

It occurs to me that there is no programmatic way to encrypt the config file other than by going through rclone config so maybe we should create that - this would make scripting easier - what do you think?

Please give this a go.

v1.68.0-beta.8123.46b0c7f16.fix-7859-password-command on branch fix-7859-password-command (uploaded in 15-30 mins)

from rclone.

ncw avatar ncw commented on September 27, 2024

I've implemented command line options to mananage the config file encryption

What do you think of these @dzoep ?

v1.68.0-beta.8262.b0e17c6f8.fix-7859-password-command on branch fix-7859-password-command (uploaded in 15-30 mins)

rclone config encryption set

This command sets or changes the config file encryption password.

If there was no config password set then it sets a new one, otherwise
it changes the existing config password.

Note that if you are changing an encryption password using
--password-command then this will be called once to decrypt the
config using the old password and then again to read the new
password to re-encrypt the config.

When --password-command is called to change the password then the
environment variable RCLONE_PASSWORD_CHANGE=1 will be set. So if
changing passwords programatically you can use the environment
variable to distinguish which password you must supply.

Alternatively you can remove the password first (with rclone config encryption remove), then set it again with this command which may be
easier if you don't mind the unecrypted config file being on the disk
briefly.

Usage:
  rclone config encryption set [flags]

Flags:
  -h, --help   help for set

rclone config encryption remove

Remove the config file encryption password

This removes the config file encryption, returning it to un-encrypted.

If --password-command is in use, this will be called to supply the old config
password.

If the config was not encrypted then no error will be returned and
this command will do nothing.

Usage:
  rclone config encryption remove [flags]

Flags:
  -h, --help   help for remove

rclone config encryption check

This checks the config file is encrypted and that you can decrypt it.

It will attempt to decrypt the config using the password you supply.

If decryption fails it will return a non-zero exit code if using
--password-command, otherwise it will prompt again for the password.

If the config file is not encrypted it will return a non zero exit code.

Usage:
  rclone config encryption check [flags]

Flags:
  -h, --help   help for check

from rclone.

ncw avatar ncw commented on September 27, 2024

Thank you for testing :-)

I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.68

from rclone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.