tags:

views:

28

answers:

2

in git, how I can add a remote origin when my host use a different ssh port?
git remote add origin ssh://user@host/srv/git/example

+1  A: 

You can just do this:

git remote add origin ssh://user@host:1234/srv/git/example
igorw
+1  A: 

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.

bramp