Skip to content

Conversation

@JoeZiminski
Copy link
Member

@JoeZiminski JoeZiminski commented Sep 11, 2025

This PR adds the option to encrypt the RClone config file containing SSH, AWS or GDrive connection information (e.g. private key, passwords, access tokens). The main changes are:

  1. SSH, AWS and GDrive RClone configs are now stored in separate .conf files (previously, the RClone default to store everything in RClone's rclone.conf was used. This is still kept for local_filesystem for backwards compatibility.
  2. There is now an option during set up connections (via Python API or TUI) to encrpy the config file. Doing so will encrypt the file using the operating systems credential manager.

This required quite a lot of refactoring to the setup connection functions (API and TUI) as well as the internal calls to rclone. Now, these calls are wrapped in some functionality that handles unencrypting the rclone config if required.

Tests and documentation have been updated.

This implementation is okay but there is still room for improvement. However, as this PR is pretty big and we just need to get this out, these are reversed for the future (#636).

@JoeZiminski JoeZiminski changed the title Refactor SSH connection to make adding passwords easier. Add password for SSH, AWS and GDrive config Sep 12, 2025
@JoeZiminski JoeZiminski marked this pull request as draft September 29, 2025 16:15
@JoeZiminski JoeZiminski force-pushed the add_password_to_rclone_config_for_aws_gdrive branch from 53a5a05 to 274fe29 Compare October 2, 2025 18:08
@JoeZiminski JoeZiminski mentioned this pull request Oct 7, 2025
@JoeZiminski JoeZiminski changed the base branch from main to refactor_ssh_connection October 7, 2025 21:46
@JoeZiminski JoeZiminski force-pushed the add_password_to_rclone_config_for_aws_gdrive branch 3 times, most recently from 44af5de to 5c21724 Compare November 1, 2025 01:25
Base automatically changed from refactor_ssh_connection to main November 3, 2025 15:30
@JoeZiminski JoeZiminski force-pushed the add_password_to_rclone_config_for_aws_gdrive branch from 350ac89 to 0c2c1b2 Compare November 3, 2025 15:43
@JoeZiminski JoeZiminski marked this pull request as ready for review November 3, 2025 21:39
@JoeZiminski JoeZiminski force-pushed the add_password_to_rclone_config_for_aws_gdrive branch from 7c328ea to 51f7c6c Compare January 31, 2026 20:26
@JoeZiminski JoeZiminski force-pushed the add_password_to_rclone_config_for_aws_gdrive branch from a728ae4 to 6079eb5 Compare February 2, 2026 23:07
Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this with Google Drive on MacOS.

All went well (incl. authentication) until I trying to encrypt the credentials using the built-in macOS' security tool (as prompted). I'm pasting the exception as screenshot, because my terminal didn't allow me to properly copy the exception text.

Screenshot 2026-02-03 at 11 49 47 Screenshot 2026-02-03 at 11 50 11

I tried several times, including setting from scratch, but to no avail.

Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out it was the Rclone version, thanks for the tip @JoeZiminski.

The problem went away by updating Rclone from 1.65 to 1.73.

@ishan372or
Copy link
Contributor

@JoeZiminski I tested this on Windows 11 (rclone v1.73.0).
Google Drive setup and OAuth worked fine, and the encryption prompt appeared.
However, encryption fails at the final step with:
Screenshot 2026-02-04 212320

@JoeZiminski
Copy link
Member Author

Hey @ishan372or thanks for this! I'm a bit stumped, the only clue is that the drive is missing from your path e.g. Khan\... rather than C:\Users\Khan\..., so maybe something is breaking in the path handling somewhere. Could I check the full path to your user folder Khan?

@JoeZiminski
Copy link
Member Author

Hi @ishan372or don't worry, I can replicate now I guess you have a space somewhere along that path? thanks! This is a very useful case that was not properly handled, will push a fix

@JoeZiminski
Copy link
Member Author

Hi @ishan372or thanks again for testing, could you try again with the latest version of this branch?

@ishan372or
Copy link
Contributor

@JoeZiminski , I pulled the latest commits and retested windows 11. It ran succesfully this time.
Screenshot 2026-02-06 212742

@JoeZiminski
Copy link
Member Author

Perfect, thanks @ishan372or! BTW I think #669 is complete, GitHub is having CI issues ATM but once they are fixed and the tests can run will be good to merge. Thanks a lot for that

@ishan372or
Copy link
Contributor

thanks. Happy to help

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

Successfully merging this pull request may close these issues.

5 participants