Which cloud storage system are you using? (eg Google Drive)
gcs
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone ls gcs:<bucket>
The rclone config contents with secrets removed.
[gcs]
type = google cloud storage
project_number = <removed>
user_project = <removed> # command results in same error with and without this set.
env_auth = false
token = <removed>
A log from the command with the -vv flag
~ rclone ls gcs://<bucket>/ -vv
DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "ls" "gcs://<bucket>/" "-vv"]
DEBUG : Creating backend with remote "gcs://<bucket>/
2023/05/23 19:27:21 DEBUG : Using config file from "/Users/austin/.config/rclone/rclone.conf"
2023/05/23 19:27:21 DEBUG : fs cache: renaming cache item gcs://<bucket>/" to be canonical "gcs:<bucket>/
2023/05/23 19:27:22 DEBUG : 5 go routines active
2023/05/23 19:27:22 Failed to ls: googleapi: Error 400: Bucket is a requester pays bucket but no user project provided., required
rclone ls gcs:/bucket/ -vv --dump bodies --user_project <project_name>
Error: unknown flag: --user_project
Usage:
rclone ls remote:path [flags]
Flags:
-h, --help help for ls
Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
is it supposed to take user_project as a cmd like flag?
There isn't a mention of the arg when i run rclone config for gcs. I just added it to my config file because i noticed it in the go code.
Use the flag --gcs-user-project 123123123 . This should be the same as setting user_project in the config file, but it is worth checking as the config file may be wrong somehow.
If you use that, then you should see it in -vv --dump bodies
GET /storage/v1/b/bucket/o?...&userProject=123123123 HTTP/1.1
No worries, thanks Nick. Here's what that gets us.
rclone ls gcs:/bucket/ -vv --dump bodies --gcs-user-project <project_name>
Error: unknown flag: --gcs-user-project
Usage:
rclone ls remote:path [flags]
Flags:
-h, --help help for ls
Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
2023/05/25 18:26:07 Fatal error: unknown flag: --gcs-user-project
--gcs-user-project also isn't listed as a flag in Global Flags. Is it meant to be?
I don't believe project-number works with requester pays buckets. that's why I've been specifically trying user-project There's nothing about it in the docs but it seems supported in the source code as mentioned above.
My mistake, I wasn't clear. I followed the docs to use --gcs-project-number + specifying a project-number in my config before opening the this thread. The google api seems to specifically want a user_project