gogs: Submodule with 'ssh:// method' and alternate port breaks hyperlink in webui
- Gogs version (or commit ref): 0.11.34.1122
- Git version: 2.11.0
- Operating system: debian 9.3 amd64
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gogs.io:
- Yes (https://try.gogs.io/zefie/gogs_custom_ssh_port_submodule_test)
- No
- Not relevant
- Log gist (usually found in
log/gogs.log
): (nothing related)
Description
Adding a submodule that uses an alternate port (‘ssh:// method’) causes the hyperlink to the submodule’s git to be broken.
I guess this wouldn’t normally be used (realized I was doing mine wrong) but at the same time, it could be useful in some private environments.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (9 by maintainers)
I would like to get some eyes on the patch I added. https://github.com/gogs/gogs/pull/7383
Thank you for pointing that out, was about to waste alot of time building the whole app
I am not familiar with the go language but this seems fairly trivial:
if (first 3 letters of repo = ssh) then do not include port in URL else include port in url
I’ve just created a submodule link also using ssh (to port 8022). My main project is:
ssh://git@git.domain:8022/Docker/Docker.git
my submodule isIn the web UI of Gogs the link for the
conf
folder in theopenhab
directory is for https://git.domain/8022/HomeAutomation/OpenHAB/commit/f49efa46370da23ec34055d568a6b8401755516aSo it’s taken the :8022 port and made a folder as part of the link.