truenas / charts

TrueNAS SCALE Apps Catalogs & Charts
BSD 3-Clause "New" or "Revised" License
258 stars 253 forks source link

Gitea clone URL #2605

Closed ukos-git closed 1 week ago

ukos-git commented 2 weeks ago

If the gitea ssh server runs on a non-default port, gitea shows the clone url with protocol and port included as follows

ssh://git@{ROOT_URL}:{SSH_PORT}/{USER}/{REPO}.git instead of git@{ROOT_URL}:{USER}/{REPO}.git

From the Config Cheat Sheet it is clear, that one should use GITEA__server__SSH_PORT variable and set it to 22 to display the second variant if the ssh port is forwarded to gitea. However, as both, SSH_PORT, and SSH_LISTEN_PORT are set by the config file, I cannot set this variable anymore in my app config.

I would suggest to either allow to set both variables in the configuration.tpl by the interface to separate values or to remove SSH_PORT from the tpl to allow users to set it on thier own.

https://github.com/truenas/charts/blob/fd14bc6c276e39087df131c959bdeab602a2cc31/library/ix-dev/community/gitea/templates/_configuration.tpl#L47-L50

USE_COMPAT_SSH_URI The variable ` GITEA__repository__USE_COMPAT_SSH_URI=false` seems to only have an effect for displaying `ssh://` if the default port is already 22 and one does not want the ` git@` display
ukos-git commented 1 week ago

Thank you. That was quick. PR looks good and should not break existing configs.