feat(forgejo): Use configurable SSH port for repository URLs

This commit is contained in:
Matteo Cherubini 2026-05-09 17:03:15 +02:00
parent 84b70620b5
commit a78ae843a7

View file

@ -44,8 +44,7 @@ provider_ssh_url() {
local host
# Extract hostname by removing protocol and trailing slashes
host=$(echo "${FORGEJO_URL}" | sed -e 's|^[^/]*//||' -e 's|/*$||')
# Using port 222 as default for many homelab Forgejo/Gitea setups
echo "ssh://git@${host}:222/${FORGEJO_USER}/${1}.git"
echo "ssh://git@${host}:${FORGEJO_SSH_PORT:-222}/${FORGEJO_USER}/${1}.git"
}
provider_web_url() {