git remote add with other SSH port git remote add with other SSH port git git

git remote add with other SSH port


You can just do this:

git remote add origin ssh://user@host:1234/srv/git/example

1234 is the ssh port being used


You need to edit your ~/.ssh/config file. Add something like the following:

Host example.com    Port 1234

A quick google search shows a few different resources that explain it in more detail than me.


Best answer doesn't work for me. I needed ssh:// from the beggining.

# does not workgit remote set-url origin user@example.com:10000/aaa/bbbb/ccc.git# workgit remote set-url origin ssh://user@example.com:10000/aaa/bbbb/ccc.git