--ask-password not working for crypt remote

What is the problem you are having with rclone?

I want to provide the password for my crypt remote on the command line, and not have it stored anywhere on disk. I created the crypt remote using rclone config as per the documentation. Then I tried to mount the remote on a local directory, but rclone doesn't ask me for the password and fails.

I was able to work around the problem using the --crypt-password parameter and created a script to do it, but I thought I'd see if I was doing something wrong.

My workaround:

# Get the password
echo 'Enter the rclone password:'
read -s RCLONE_PWD
OBSCURED=$(rclone obscure $RCLONE_PWD)

# Mount the drive
rclone -vv mount my_crypt_remote: /mnt/mydir/ --crypt-password $OBSCURED --daemon

# Clean up
unset OBSCURED
unset RCLONE_PWD

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

rclone v1.64.2

  • os/version: arch "rolling" (64 bit)
  • os/kernel: 6.5.9-arch2-1 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.21.3
  • go/linking: dynamic
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone -vv --ask-password=true mount my_crypt_remote: /mnt/mydir/

The rclone config contents with secrets removed.

[my_crypt_remote]
type = crypt
remote = my_gdrive_remote:my_encrypted_dir

A log from the command with the -vv flag

[myuser@mypc ~]$ rclone -vv --ask-password=true mount my_crypt_remote: /mnt/mydir/
2024/04/02 14:13:08 DEBUG : rclone: Version "v1.64.2" starting with parameters ["rclone" "-vv" "--ask-password=true" "mount" "my_crypt_remote:" "/mnt/mydir/"]
2024/04/02 14:13:08 DEBUG : Creating backend with remote "my_crypt_remote:"
2024/04/02 14:13:08 DEBUG : Using config file from "/home/myhome/.config/rclone/rclone.conf"
2024/04/02 14:13:08 Failed to create file system for "my_crypt_remote:": password not set in config file

I assumed --ask-password only applied to encrypted config Documentation

welcome to the forum,

so far, no seeing a bug

ok, so you got it working, do you still need help with anything?

Thanks, I misread the documentation before but I now see that it does say that.

I think the crypt documentation about passwords is a bit confusing and I think my method of providing the password might help some people, so I will put together a pull request for some documentation changes.

yes, it could help some people, but not sure it should go in the docs.
instead, create a howto guide in the forum and/or at rclone wiki.

Having that information in the wiki would not have helped me - I looked in the docs which is where I think most people would look.

I am getting the feeling that there is not a lot of interest in updates to the documentation.

2 Likes

It's easier to create a how to or add stuff to the wiki I believe.

So, if you start with the wiki it can always be edited into the mainline documentation if the powers that be think it belongs there.

This way it's officially documented in the system and people can find it if they look.

Now you know for the future to check the wiki in addition to the documentation when you run into a jam.

I'm glad I don't have to deal with what you are going through because I would have no idea how to do all the scripting and environment variables.

your issue is a simple edge case on how to use a flag.
sure, create a pull request. i have done a few pull requests about the docs.

fwiw, i have created 20+ howto guides in the forum and a few topics at the wiki.
i no longer bother with the wiki, i just do howto guides.

so, in the mean time, i suggest to create a howto guide in the forum.
if not, i can create one for you?

1 Like

I'd whole heartedly say to update the documentation. I always start there myself.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.