Run rclone rc by supplying the config directly in command line

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

I was wondering if there is a way to use rclone rc without actually creating the config file but instead supply the configuration as an argument. I did try with below command but it errors out. The Official documentation doesn't clearly specify the usage.

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

rclone v1.67.0

  • os/version: darwin 14.5 (64 bit)

  • os/kernel: 23.5.0 (arm64)

  • os/type: darwin

  • os/arch: arm64 (ARMv8 compatible)

  • go/version: go1.22.4

  • go/linking: dynamic

  • go/tags: cmount

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 rc operations/list fs="my-remote:" remote= _config='{"remote": {"my-remote": {"scope": "drive","team_drive": "","token": "{\"access_token\":\"yXQOJHrBfw0177\",\"token_type\":\"Bearer\",\"refresh_token\":\"1//0gW3C1kXSUQPFCgYIARAAGB\",\"expiry\":\"2024-08-25T03:06:10.124094+05:30\"}","type": "drive"}},"type":"drive"}'

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

I've deliberately renamed the config file to try this out

2024/08/26 16:37:30 NOTICE: Config file "/Users/username/.config/rclone/rclone.conf" not found - using defaults
; empty config
### Double check the config for sensitive info before posting publicly

A log from the command that you were trying to run with the -vv flag

2024/08/26 16:43:34 DEBUG : rclone: Version "v1.67.0" starting with parameters ["rclone" "rc" "operations/list" "fs=my-remote:" "remote=" "_config={\"remote\": {\"my-remote\": {\"scope\": \"drive\",\"team_drive\": \"\",\"token\": \"{\\\"access_token\\\":\\\"yXQOJHrBfw0177\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"refresh_token\\\":\\\"1//0gW3C1kXSUQPFCgYIARAAGB\\\",\\\"expiry\\\":\\\"2024-08-25T03:06:10.124094+05:30\\\"}\",\"type\": \"drive\"}},\"type\":\"drive\"}" "-vv"]
{
	"error": "didn't find section in config file",
	"input": {
		"_config": "{\"remote\": {\"my-remote\": {\"scope\": \"drive\",\"team_drive\": \"\",\"token\": \"{\\\"access_token\\\":\\\"yXQOJHrBfw0177\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"refresh_token\\\":\\\"1//0gW3C1kXSUQPFCgYIARAAGB\\\",\\\"expiry\\\":\\\"2024-08-25T03:06:10.124094+05:30\\\"}\",\"type\": \"drive\"}},\"type\":\"drive\"}",
		"fs": "my-remote:",
		"remote": ""
	},
	"path": "operations/list",
	"status": 500
}
2024/08/26 16:43:34 DEBUG : 7 go routines active
2024/08/26 16:43:34 Failed to rc: operation "operations/list" failed: didn't find section in config file

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