Git not using custom origin port, falls back to 22

26 Views Asked by At

I have remote which has a URL [email protected]:8088/dusan.work/portfolio.git, whenever I try to git push it returns an error stating:

ssh: connect to host gitea.kong port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Further inspecting network traffic with tcpdump I figured that it is indeed trying to connect to the port 22.

1

There are 1 best solutions below

0
Dusan Gligoric On

After looking trough many posts I figured that the only issue was missing ssh:// in front of the remote URL.

Now with ssh://[email protected]:8088/dusan.work/portfolio.git its working as intended.