Adding Deploy key fails on Rootless Docker image #11815

Closed
opened 2025-11-02 09:48:36 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @picsel2 on GitHub (Oct 9, 2023).

Description

I recently migrated from a plain systemd service to the rootless docker image.

Adding a deploy key fails now with an internal server error (HTTP 500) and the page displays the message:

AddDeployKey, calcFingerprintSSHKeygen: 'ssh-keygen -lf /tmp/gitea/gitea_keytest3938037311' failed with error 'exec: "ssh-keygen": executable file not found in $PATH': 

I use the OpenSSH server of the host and passthrough.
The internal ssh server is disabled and the SSH_KEYGEN_PATH option is deliberately set to "".

#23363 describes a similar issue.

Using here the same condition as in the other issue seems to fix it for me.

Gitea Version

v1.20.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 20.04 + podman 3.4 + rootless image

How are you running Gitea?

I use the rootless docker image from docker hub (rootless-latest).
I run it using systemd service units that executes a podman container (generated with podman generate).

Database

SQLite

Originally created by @picsel2 on GitHub (Oct 9, 2023). ### Description I recently migrated from a plain systemd service to the rootless docker image. Adding a deploy key fails now with an internal server error (HTTP 500) and the page displays the message: ``` AddDeployKey, calcFingerprintSSHKeygen: 'ssh-keygen -lf /tmp/gitea/gitea_keytest3938037311' failed with error 'exec: "ssh-keygen": executable file not found in $PATH': ``` I use the OpenSSH server of the host and passthrough. The internal ssh server is disabled and the SSH_KEYGEN_PATH option is deliberately set to "". #23363 describes a similar issue. Using [here](https://github.com/go-gitea/gitea/blob/main/models/asymkey/ssh_key_fingerprint.go#L84) the same condition [as in the other issue](https://github.com/go-gitea/gitea/pull/23798/files#diff-9d747db0775315b20f6cce2f079299cd7cdb0ba8e5b21260f1a329799e4cad90R182) seems to fix it for me. ### Gitea Version v1.20.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Ubuntu 20.04 + podman 3.4 + rootless image ### How are you running Gitea? I use the rootless docker image from docker hub (`rootless-latest`). I run it using systemd service units that executes a podman container (generated with `podman generate`). ### Database SQLite
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11815