getCredentials error?

Hi everyone,

New restic user here with technical background. I’m trying to use restic with a BackBlaze B2 bucket to back up a Windows machine.
As recommended in the docs I’m trying to use the S3 compatible API. I believe I’ve been following the instructions in the restic and backblaze documentation correctly, but I get an error output when trying to initialize a repository. The bucket was created a day ago, fyi.

I’ve set (values redacted)
AWS_SECRET_ACCESS_KEY=[applicationKey]
AWS_ACCESS_KEY_ID=[keyID]

Command and output was:
restic -r s3:s3.us-west-004.backblazeb2.com/[bucket]/ init
enter password for new repository:
enter password again:
Fatal: create repository at s3:s3.us-west-004.backblazeb2.com/[bucket]/ failed: Fatal: unable to open repository at s3:s3.us-west-004.backblazeb2.com/[bucket]/: open: s3.getCredentials: no credentials found. Use -o s3.unsafe-anonymous-auth=true for anonymous authentication

I’ve searched the webs and this forum but haven’t seen it mentioned.

Restic version: restic 0.17.0 compiled with go1.22.5 on windows/amd64
I installed restic with Scoop yesterday.

Could someone please nudge me in the right direction?

Thanks!

Apparently the environment variables were not passed correctly to restic (the variable names are correct). How, exactly did you set those variables and how do you run restic (cmd/powershell/…)?