Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal: wrong password or no key found - Even after init #2971

Closed
StephaneBunel opened this issue Oct 2, 2020 · 7 comments
Closed

Fatal: wrong password or no key found - Even after init #2971

StephaneBunel opened this issue Oct 2, 2020 · 7 comments

Comments

@StephaneBunel
Copy link

Output of restic version

restic 0.10.0 (v0.10.0-38-ge9943e86) compiled with go1.14 on linux/amd64

How did you run restic exactly?

export AWS_ACCESS_KEY_ID="xxxxxxxxxx"
export AWS_SECRET_ACCESS_KEY="yyyyyyyyyy"
export AWS_DEFAULT_REGION="fr-par"
export RESTIC_REPOSITORY="s3:bucket-name.s3.fr-par.scw.cloud/restic"

restic -p ~/.restic-repo-password init
created restic repository f02eff4faa at s3:bucket-name.s3.fr-par.scw.cloud/restic

restic -p ~/.restic-repo-password backup Music/
Fatal: wrong password or no key found

What backend/server/service did you use to store the repository?

S3 Scaleway Object Storage - https://www.scaleway.com/en/object-storage/

Expected behavior

Data backuped

Actual behavior

Fatal: wrong password or no key found

Steps to reproduce the behavior

Every command fail after init:

restic -p ~/.restic-repo-password check
Fatal: wrong password or no key found

Do you have any idea what may have caused this?

No

Do you have an idea how to solve the issue?

No

Did restic help you today? Did it make you happy in any way?

Yes, of course, like every backup systems ;-)

@rawtaz
Copy link
Contributor

rawtaz commented Oct 2, 2020

I never used restic with Scaleway, but could this be caused by some eventual consistency (whereby restic doesn't see e.g. the key files right away after the init command)? Otherwise, what about permissions?

@StephaneBunel
Copy link
Author

StephaneBunel commented Oct 2, 2020

Not sure permissions are involved. I can list bucket files with s3cmd and same credentials.

s3cmd ls s3://bucket-name/restic/
                       DIR   s3://bucket-name/restic/keys/
2020-10-02 17:57       150   s3://bucket-name/restic/
2020-10-02 17:57       155   s3://bucket-name/restic/config

If I try to init twice, restic seems to see the files:

restic -p ~/.restic-repo-password init
Fatal: create key in repository at s3:https://bucket-name.s3.fr-par.scw.cloud/restic failed: repository master key and config already initialized

@StephaneBunel
Copy link
Author

It works If I change RESTIC_REPOSITORY to:

export RESTIC_REPOSITORY="s3:s3.fr-par.scw.cloud/bucket-name/restic"

Dont know why the init worked but not check !!

@rawtaz
Copy link
Contributor

rawtaz commented Oct 2, 2020

Thanks for getting back on this. I suppose the "new" URL you use is more proper so if that solves the problem I too am all fine with closing this issue, as you did. Thanks!

@nxb303
Copy link

nxb303 commented Oct 14, 2022

For me, it still does not work, even after appending /restic to the repository URL - init works fine, but for the backup command, it always gives me a Fatal: wrong password or no key found error. The keys directory exists in the storage though.

@MichaelEischer
Copy link
Member

@nxb303 Please open a new issue, there's not enough information on your setup for us to help. Please refer back to this issue if you think it is the same one.

@Emanuel-S-1
Copy link

I had a very similar fault with another S3 provider (non-AWS). The bucket URL is provided in two different formats, one is the endpoint URL https://s3.location.provider.com/ the other format is called Virtual Hosted-Style https://bucketname.s3.location.provider.com/.
I tried the Virtual Hosted-Style at first, I had set RESTIC_REPOSITORY to https://bucketname.s3.location.provider.com/repositoryname.
Restic seems to accept the virtual hosted style for the init command, but any attempt to connect immediately after creating the repo doesn't work. The error is Fatal: wrong password or no key found. Everything seems to work now after I defined the RESTIC_REPOSITORY in the format: https://s3.location.provider.com/bucketname/repositoryname

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants