AskPassword in Remote control

What is the problem you are having with rclone?

rclone is always asking the password

Run the command 'rclone version' and share the full output of the command.

the github repo

rclone v1.70.0-DEV
- os/version: ubuntu 24.04 (64 bit)
- os/kernel: 6.8.0-57-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.2
- go/linking: dynamic
- go/tags: none

The command you were trying to run

go run . --rc --rc-no-auth rc operations/list --json '{"_config": { "AskPassword": false }, "remote": "test", "fs": "/tmp"}'

# will ask the password
Enter configuration password:
password:

Related to

I think it's because rclone is using a background context

func Decrypt(b io.ReadSeeker) (io.Reader, error) {
	ctx := context.Background()
	ci := fs.GetConfig(ctx)
       // ...
}

Note that

go run . --rc --rc-no-auth rc options/local --json '{"_config": { "AskPassword": false }}'

Returns the "AskPassword": false correctly

Hi

I add the same problem. The RPC server is created and then answer to RPC calls.
You need first to edit the config with options/set then to do the call
A poor man's job is to use somthing PasswordCommand with ["printf", "--", "thepassword"] to communicate the password

I made this pull request add rc call to unlock config by Its-Just-Nans · Pull Request #8496 · rclone/rclone · GitHub

1 Like