git using a custom ssh port
Questions
When you have deployed your own gitlab service on web, you may need to use a custom SSH port to clone, pull, or push your code from or to your server. The default SSH port 22 is used by the system SSH service, so you must choose another port for your gitlab service.
After you get everything done, you may find that you can’t clone your repository because of the access error. If you check carefully, you will find that the default git url is scp-like syntax. You can’t change port to your custom SSH port.
git clone user@hostname:/path/to/repo.git
output
ssh: connect to host [hostname] port 22: Connection timed out
fatal: Could not read from remmote repository.
Please make sure you have the correct access rights and the repository exists.