Can I pass 'service_account_file' content instead of file path while creating Google Cloud Storage Remote?

What is the problem you are having with rclone?

I am running Rclone in RC mode in one server and sending http request to rclone to create remotes and then file transfers from another client machine.
I use for aws, ADLS, GCS and SFTP.

Now for GCS I need to use service account json key file to create remote and so I need to upload the file key file to server beforehand and then pass the location of the key file in 'service_account_file' field while creating the remote -

I am passing something like below:
"project_number": "833555719067",
"bucket_policy_only": "true",
"service_account_file": "/home/ubuntu/Rclone/gcs-key-file/integration-3-344806-e1931747708f.json",
"location": "asia-south1"

Above steps work fine.

But I wanted to check if there is any way I can pass the content of 'service account file' directly while creating remote instead of separately uploading this key file to server before and then using it ?

One reason is uploading this key file to rclone server local disk is extra process, second thing is this json key file needs to be sitting in server in plaintext format.

Any suggestion is much appreciated

Thanks
Mahendra

In google drive we have

  --drive-service-account-credentials string   Service Account Credentials JSON blob

It would be easy enough to do the same for google cloud storage.

Fancy having a go at adding this?

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