You can just do this:
git remote add origin ssh://user@host:1234/srv/git/example
1234
is the ssh port being used
More Related Contents:
- How to specify the private SSH-key to use when executing shell command on Git?
- Is it possible to create a remote repo on GitHub from the CLI without opening browser?
- Specify an SSH key for git push for a given domain
- git-upload-pack: command not found, when cloning remote Git repo
- Git SSH error: “Connect to host: Bad file number”
- Start ssh-agent on login [closed]
- SSH Key – Still asking for password and passphrase
- ssh: connect to host github.com port 22: Connection timed out
- Fix msysGit Portable $HOME location
- Repository access denied. access via a deployment key is read-only
- Git push results in fatal: protocol error: bad line length character: This
- Git clone with custom SSH using GIT_SSH error
- Git On Custom SSH Port
- github: No supported authentication methods available
- Passing ssh options to git clone
- .ssh/config file for windows (git)
- git push via cron
- Clone works, remote push doesn’t. Remote repository over copssh
- Could not open a connection to your authentication agent
- Using a socks proxy with git for the http transport
- Git submodules and ssh access
- git clone hangs forever on github
- Git on Bitbucket: Always asked for password, even after uploading my public SSH key
- VS Code / Bitbucket / SSH – Permission denied (publickey)
- git push to remote repository “Could not read from remote repository”
- GnuTLS recv error (-110): The TLS connection was non-properly terminated
- How to manage multiple ssh keys in the ~/.ssh directory
- Cygwin/Git error cygheap base mismatch detected
- SSH Agent Forwarding with Ansible
- Issue on adding SSH key to GitHub