I created git bare repository in my home directory like ~/git-repos/foo.git.To add a remote repository I typed like git remote add origin ssh://username@hostname:10022~/git-repo/foo.git.But it fails with error ssh: Could not resolve hostname hostname:10022~: Name or service not known.If I replace ~ to /home/username, then it works fine.Is there way to use ~ expression for git remote with ssh protocols?
`git remote add` to home dir by `~` expression
ssh;git;home
You need a / to indicate where the host spec ends and the path begins:git remote add origin ssh://username@hostname:10022/~/git-repo/foo.git