I am trying to get gitea inside Docker on Windows to run, when I start the container I get the following error:
gitea_1 | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
gitea_1 | @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
gitea_1 | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
gitea_1 | Permissions 0755 for '/data/ssh/ssh_host_ed25519_key' are too open.
gitea_1 | It is required that your private key files are NOT accessible by others.
gitea_1 | This private key will be ignored.
gitea_1 | Error loading host key "/data/ssh/ssh_host_ed25519_key": bad permissions
gitea_1 | Could not load host key: /data/ssh/ssh_host_ed25519_key
More informations would be good. Doing what the message says and changing user permissions to revoke rw rights of other users on said files didn’t do the trick?
I’m assuming you’re using bind mounts to create this container?
This is a well-known issue with Docker for Windows, and it’s a real pest.
The issue is that everything that you share from Windows, in to a linux based container will have very permissive permissions. SSH, databases, and a few other things don’t like that.
The gitea dockerfile (the thing that does all the legwork in the Docker world), attempts to modify the permissions of the ssh key files, but as they’re mounted from Windows, they can’t be changed, and everything just grinds to a halt.
At the moment, the best advice I can give is to use docker named volumes, which aren’t nearly as useful, and if you’re not careful can be deleted, along with all your info.