I setup a brand new rest-server with docker today (version 0.13.0) and tried to use restic (version 0.14.0) to create a new repository.
I setup a user with docker exec -ti create user myuser
and set a password.
Then i set in my shell
export RESTIC_REPOSITORY=rest:http://hostname:8000/backup
export RESTIC_PASSWORD=<verySecr3t>
export RESTIC_REST_USERNAME=myuser
export RESTIC_REST_PASSWORD=<passwordFromAbove>
as it is written in documentation.
Then i tried:
restic init
and got
Fatal: create repository at rest:http://hostname:8000/server-backup/ failed: Fatal: server response unexpected: 401 Unauthorized (401)
But when i run in shell
curl http://${RESTIC_REST_USERNAME}:${RESTIC_REST_PASSWORD}@hostname:8000/server-backup/
Method Not Allowed
and
curl http://${RESTIC_REST_USERNAME}:blafoo@hostname:8000/server-backup/
Unauthorized
So the RESTIC_REST_USERNAME and RESTIC_REST_PASSWORD work in curl, but not in restic.
Whats’s wrong?