gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Can not verify your SSH key: SSHKeyGenParsePublicKey failed: exit status 255 No user exists for uid 997

Open wxiaoguang opened this issue 2 years ago • 7 comments

Some docker users are affected by this bug (not only one) when they try to add public keys.

Can not verify your SSH key: SSHKeyGenParsePublicKey: fail to parse public key: exec(629f88e0-5:SSHKeyGenParsePublicKey) failed: exit status 255() stdout: stderr: No user exists for uid 997 - No user exists for uid 997

It's likely cased by the error reported by the ssh-keygen command executed by Gitea, which meets the non-existing UID 997.

I don't know how it happens at the moment. For Gitea Docker, the UID should have been default to 1000, maybe user's setup steps/configs/operations could provide some clues.

wxiaoguang avatar Jun 08 '22 15:06 wxiaoguang

As far as I can see our entrypoint (for the docker with root) would ensure that the USER_UID is in the /etc/passwd file.

Therefore I think this can only happen on the root docker if they're not using our entrypoint - I don't think we can be expected to correctly configure things if they're not using our entrypoint.

On the rootless - do we really use ssh-keygen there?

zeripath avatar Jun 08 '22 20:06 zeripath

I have checked the entrypoint logic and tried to play a while, but I have difficulty to reproduce the problem (I do not know what the users have done on their side .....)

Another thing that I do not understand is whose UID is 997. In most Linux distro, the 997 doesn't seem to be a common UID, and it doesn't seem to be easily used by a user by mistake.

wxiaoguang avatar Jun 09 '22 05:06 wxiaoguang

I have checked the entrypoint logic and tried to play a while, but I have difficulty to reproduce the problem (I do not know what the users have done on their side .....)

Another thing that I do not understand is whose UID is 997. In most Linux distro, the 997 doesn't seem to be a common UID, and it doesn't seem to be easily used by a user by mistake.

988 for me. Experiencing basically the same thing.

kubo6472 avatar Sep 12 '22 17:09 kubo6472

Could you provide your setup details? A reproducible example would help the debug.

wxiaoguang avatar Sep 12 '22 17:09 wxiaoguang

Nevermind, it was my configuration mistake

kubo6472 avatar Sep 16 '22 07:09 kubo6472

Could you share your experiences? It will help other users. Thank you.

wxiaoguang avatar Sep 16 '22 08:09 wxiaoguang

It's very specific, but sure: image I clicked this button, it made that error happen. It was downloaded from here: https://github.com/parkervcp/eggs/tree/master/software/gitea and it runs on Pterodactyl Panel

kubo6472 avatar Sep 17 '22 20:09 kubo6472

No more feedbacks

wxiaoguang avatar Dec 13 '22 04:12 wxiaoguang

I use pterodactyl too and with this set to false, the error is still there.

MvBonin avatar Mar 23 '23 11:03 MvBonin

Can you help to provide more clues? Or could you help to provide a minimal reproduce setup instruction?

wxiaoguang avatar Mar 23 '23 11:03 wxiaoguang