rclone/How To/wrap with 1Password and mise
Properties
- tags
- Diataxis/How To
How To wrap rclone with 1Password + mise
Goal
Preconditions
Procedure
1. Author the
rclone.envfile- Create the directory if needed:
mkdir -p ~/.config/rclone - Add one variable per secret using 1Password secret-reference URIs:env
# AWS remote called "s3prod" RCLONE_CONFIG_S3PROD_TYPE=s3 RCLONE_CONFIG_S3PROD_PROVIDER=AWS RCLONE_CONFIG_S3PROD_ACCESS_KEY_ID=op://DevVault/S3Prod/key_id RCLONE_CONFIG_S3PROD_SECRET_ACCESS_KEY=op://DevVault/S3Prod/secret_key # optional global flags RCLONE_STATS=5s - rclone reads any
RCLONE_*orRCLONE_CONFIG_<REMOTE>_*variables just like CLI flags, so this completely avoids putting credentials inrclone.conf.
- Create the directory if needed:
2. Verify the env-file with
op run3. Create the mise task
- Edit (or create)
~/.config/mise/config.toml:toml[tasks.rclone] desc = "rclone with 1Password-injected secrets" run = [ "op run --env-file ~/.config/rclone/rclone.env -- rclone" ] - Because no templated args (
{{arg(...)}}, etc.) are defined, any arguments passed tomise rclone …will automatically be forwarded torclone.
- Edit (or create)
4. Use it
Troubleshooting
op: item not found→ check the vault/item names in each secret reference.No accounts configured for use with 1Password CLI→ unlock 1Password or runop signinif desktop integration is disabled.- rclone reports missing credentials → confirm the env-var names follow
RCLONE_CONFIG_<REMOTE>_<OPTION>exactly.
References
- Load secrets into scripts
- Environment Variables – rclone Documentation