I'm connecting to our own Ceph cluster using rclone while trying to create the remote on the fly using connections strings. If I specify the endpoint with a prefixed https://, rclone complains about a missing secret_access_key. If I remove the leading https://, it works. If I shift the endpoint parameter to a different place in the connection string, I get an error about the server misbehaving.
I understand that the prefixed https:// might be problematic, but it seems to me rclone's handling of the problem is also somewhat inconsistent and a better error message would possibly be helpful.
Run the command 'rclone version' and share the full output of the command.
rclone v1.56.2
os/version: ubuntu 20.04 (64 bit)
os/kernel: 5.15.0-58-generic (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.16.8
go/linking: static
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Ceph S3
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone ls :s3,access_key_id=XXX,endpoint="https://s3.ourdomain.com",secret_access_key=YYY:bucketName
The rclone config contents with secrets removed.
N/A using on-the-fly remotes
A log from the command with the -vv flag
<7>DEBUG : rclone: Version "v1.56.2" starting with parameters ["rclone" "ls" ":s3,access_key_id=XXX,endpoint=https://s3.ourdomain.com,secret_access_key=YYY:bucketName" "-vv"]
<7>DEBUG : rclone: systemd logging support activated
<7>DEBUG : Creating backend with remote ":s3,access_key_id=XXX,endpoint=https://s3.ourdomain.com,secret_access_key=YYY:bucketName"
<7>DEBUG : :s3: detected overridden config - adding "{znKRX}" suffix to name
<5>NOTICE: Config file "/home/user/.config/rclone/rclone.conf" not found - using defaults
Failed to create file system for ":s3,access_key_id=XXX,endpoint=https://s3.ourdomain.com,secret_access_key=YYY:bucketName": secret_access_key not found
If I change the endpoint parameter to
endpoint=s3.ourdomain.com
it works.
If I shift the original endpoint parameter to before the access_key_id param or after the secret_access_key param, I get a different error:
<5>NOTICE: Config file "/home/user/.config/rclone/rclone.conf" not found - using defaults
Failed to ls: RequestError: send request failed
caused by: Get "https://https/s3.ourdomain.com%2Caccess_key_id%3DXXX%2Csecret_access_key%3DYYY%3AbucketName?delimiter=&max-keys=1000&prefix=": dial tcp: lookup https on 127.0.0.53:53: server misbehaving
That probably is an issue but the main reason it didn't work was the quoting.
Your correct example had the "quotes" around it unlike the OP.
This is the hint that the shell has removed the ' before they got to rclone and that the : in the URL http:// has been taken as the end of connection string.
Shell quoting is very confusing. That's the main reason for the debug output where rclone shows you the command line it was run with. This is after the shell has removed the quotes.
Thank you @ncw and @asdffdsa for your prompt responses. If I had read the documentation more carefully and looked at the debug output more carefully, I should have been able to figure this out, apologies!
Your help is much appreciated.