Closed Phlogi closed 2 years ago
The problem is probably that the htpasswd file starts with a UTF8 BOM (Byte-Order Marker). rest-server expects this file to be plain UTF8. Both windows and unix line ending should work.
@Phlogi Can you verify that the BOM was the culprit so that we can close this issue?
@jswinner what did you reproduce exactly? The provided htpasswd.txt doesn't work due to the BOM. Just remove it and then the authentication works as expected.
@jswinner I don't see how the problem you've just described is related to this issue.
Sorry for the noise
@Phlogi Can you verify that the BOM was the culprit so that we can close this issue?
Not yet, but i'll try to do it soon.
I'm closing this issue now. Feel perfectly free to re-open it if you discover that it wasn't the BOM that was the cause.
Output of
rest-server --version
rest-server 0.10.0 compiled with go1.15.2 on windows/amd64
How did you run rest-server exactly?
rest-server.exe --listen ":9100" --append-only --path "D:\Backup" --tls --tls-cert "C:\restic\rest-server\public-key.txt" --tls-key "C:\restic\rest-server\private-key.txt" --debug
What backend/server/service did you use to store the repository?
File-based.
Expected behavior
Actual behavior
restic -r rest:https://test:hallo@domain.removed:9100/restic-repo list keys --cacert public_key Fatal: unable to open config file: unexpected HTTP response (401): 401 Unauthorized Is there a repository at the following location? rest:https://test:***@domain.removed:9100/restic-repo/
Steps to reproduce the behavior
htpasswd -n -b -B test hallo
Do you have any idea what may have caused this?
An issue with the .htaccess file on windows? I changed EOL to Unix already without any luck. Update: I added a garbage line 2 in the file at then rest-server is complaining, so it seems that the file is read:
Authentication enabled error: cannot load .htpasswd (use --no-auth to disable): record on line 2: wrong number of fields
Do you have an idea how to solve the issue?
N/A
Did rest-server help you today? Did it make you happy in any way?
Yeah it's great but i'd feel better using it with .htaccess :)