Skip to main content

Using a remote repository with a non-standard port

Method 1: Using standard syntax URL

The standard syntax is expressed thus

ssh://[user@]host.xz[:port]/path/to/repo.git/

e.g.

git clone ssh://luke@starwars.tech:6007/~/apps/react-app1

See this reference.

Method 2: Using ~/.ssh/config file

Based on this tip, create or add the following to your ~/.ssh/config file:

Host git_echidna
Hostname 89.144.19.72
Port 6677
User marc

Then the normal git syntax should work, e.g.

git push git_echidna:/opt/gitrepo/marcgreyling.com_yii2_2020.git dev