What is the problem you are having with rclone?
I want to sync two S3 backends and store the access keys outside the configuration file. My config file has two S3 backends configured. If I add the parameters access_key
and secret_access_key
to the respective profiles in the configuration file everything works as expected. However, I don't want to store the credentials in plain text in the configuration file, because that file is also stored in Git.
Version 1.53 introduced --s3-profile
and --s3-shared-credentials-file
but somehow I can't get them to work.
Run the command 'rclone version' and share the full output of the command.
rclone v1.67.0
- os/version: alpine 3.20.0 (64 bit)
- os/kernel: 5.14.0-284.59.1.el9_2.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.4
- go/linking: static
- go/tags: none
One more note on my environment: I'm using rclones docker image in an OpenShift (Kubernetes) cluster. The configuration file is passed as Configmap and I want to provide the keys as a Kubernetes secret.
Which cloud storage system are you using? (eg Google Drive)
- self-hosted MinIO
- self-hosted Quay (Image registry)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone sync quay:quay-datastore-xxx minio:quay-datastore-xxx --no-check-certificate
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
Working example with inline authentification
[minio]
type = s3
provider = Minio
region = us-east-1
endpoint = http://my-minio-server:9000
location_constraint =
server_side_encryption =
env_auth = false
access_key = xxx
secret_access_key = xxx
[quay]
type = s3
provider = Ceph
region =
endpoint = https://my-quay-server
location_constraint =
acl = private
server_side_encryption =
storage_class =
env_auth = false
access_key = xxx
secret_access_key = xxx
Preferred example, so far not working
[minio]
type = s3
provider = Minio
region = us-east-1
endpoint = http://my-minio-server:9000
location_constraint =
server_side_encryption =
env_auth = true
shared_credentials_file = /config/rclone/rclone-credentials/secrets
profile = minio
[quay]
type = s3
provider = Ceph
region =
endpoint = https://my-quay-server
location_constraint =
acl = private
server_side_encryption =
storage_class =
env_auth = true
shared_credentials_file = /config/rclone/rclone-credentials/secrets
profile = quay
I tried the parameter aws_shared_credentials_file
as well as shared_credentials_file
, respectively aws_profile
and profile
.
Content of /config/rclone/rclone-credentials/secrets
[quay]
access_key = xxx
secret_access_key = xxx
[minio]
access_key = xxx
secret_access_key = xxx
A log from the command that you were trying to run with the -vv
flag
2024/07/23 10:23:51 DEBUG : Creating backend with remote "quay:quay-datastore-xxx"
2024/07/23 10:23:51 DEBUG : Using config file from "/config/rclone/rclone.conf"
2024/07/23 10:23:51 DEBUG : Resolving service "ec2metadata" region ""
2024/07/23 10:23:51 DEBUG : Resolving service "s3" region "us-east-1"
2024/07/23 10:23:51 DEBUG : Creating backend with remote "minio:quay-datastore-xxx"
2024/07/23 10:23:51 DEBUG : Resolving service "ec2metadata" region ""
2024/07/23 10:23:51 DEBUG : Resolving service "s3" region "us-east-1"
That's all that is happening. I waited for ~10 minutes before I cancelled the operation.