Next: TLS support, Previous: Usage, Up: GoCheese
Password authentication is required for packages uploading. Passwords are dynamically changed through the FIFO file. You have to create it and use in -passwd option. Optionally, to list currently present logins use another FIFO and -passwd-list option:
$ mkfifo passwd passwd-list $ gocheese -passwd passwd -passwd-list passwd-list ...
Then you must feed it newline-separated records in following format:
username:hashed-password[:ro]
Where hashed-password
is in one of following algorithms:
To get Argon2i hashed-password you can use any of following tools:
go install github.com/balakhonova/argon2i@latest
(Go)
Example user foo
with password bar
can have the
following password file entry:
foo:$argon2i$v=19$m=32768,t=3,p=4$OGU5MTM3YjVlYzQwZjhkZA$rVn53v6Ckpf7WH0676ZQLr9Hbm6VH3YnL6I9ONJcIIU
You can use your operating system tools:
$ echo -n "password" | `command -v sha256 || echo sha256sum`
Example user foo
with password bar
will have the
following password file entry:
foo:$sha256$fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9
Optional :ro
flag forbids user to upload packages, but allows
read-only access if -auth-required is enabled.
To add or update password entry:
$ echo foo:$sha256$... > passwd $ cat passwords.txt > passwd
To delete login entry use empty password:
$ echo foo: > passwd
You can also check you passwords file with:
$ gocheese -passwd-check < passwords.txt $ echo $?