Wrong ssh url when using with IP and port #2346

Closed
opened 2025-11-02 04:33:29 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @vooidptr on GitHub (Sep 19, 2018).

  • Gitea version (or commit ref): 552d8d3 built with: bindata, sqlite
  • Git version: 2.11.0
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • [ X] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • [X ] Not relevant
  • Log gist:

Description

I use Gitea on my local network. it Ip is : 192.168.2.4 and the ssh port : 30022.
On the web interface the ssh url to clone repo is :
git@192.168.2.4:30022:linux-embedded/gyrostab.git which is not correct.
because of the double :.
The correct url is : ssh://git@192.168.2.4:30022/linux-embedded/gyrostab.git.

My app.ini file is :

[server]
SSH_DOMAIN       = 192.168.2.4:30022
HTTP_PORT        = 3000
ROOT_URL         = http://192.268.2.4:30080/
DISABLE_SSH      = false
SSH_PORT         = 22
DOMAIN           = localhost

I run it inside a docker container.

Originally created by @vooidptr on GitHub (Sep 19, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): `552d8d3 built with: bindata, sqlite` - Git version: `2.11.0` - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ X] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X ] Not relevant - Log gist: ## Description I use Gitea on my local network. it Ip is : `192.168.2.4` and the ssh port : `30022`. On the web interface the ssh url to clone repo is : `git@192.168.2.4:30022:linux-embedded/gyrostab.git` which is not correct. because of the double `:`. The correct url is : `ssh://git@192.168.2.4:30022/linux-embedded/gyrostab.git`. My `app.ini` file is : ``` [server] SSH_DOMAIN = 192.168.2.4:30022 HTTP_PORT = 3000 ROOT_URL = http://192.268.2.4:30080/ DISABLE_SSH = false SSH_PORT = 22 DOMAIN = localhost ``` I run it inside a docker container.
GiteaMirror added the type/question label 2025-11-02 04:33:29 -06:00
Author
Owner

@techknowlogick commented on GitHub (Sep 19, 2018):

SSH_DOMAIN is used for domain, not to have port included. You might want to look into USE_COMPAT_SSH_URI option to help you out. More config options here: https://docs.gitea.io/en-us/config-cheat-sheet/

@techknowlogick commented on GitHub (Sep 19, 2018): `SSH_DOMAIN` is used for domain, not to have port included. You might want to look into `USE_COMPAT_SSH_URI` option to help you out. More config options here: https://docs.gitea.io/en-us/config-cheat-sheet/
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2346