I spent about 20 minutes messing around with this problem.
I was emailed an SSH address for a repository. Crucially it had a non-standard (i.e. not 22) port number:
git@domain.com:1234/opt/git/repository.git
I assumed I could just copy-paste that into SourceTree, but kept getting This is not a valid source path / URL
error messages.
When I took a closer look at the logs, the error was that it was looking for the path 1234/opt/git/repository.git
on the server - it was treating the port number as part of the path. And obviously not finding the repo.
The solution was slightly weird:
ssh://
git@domain.com:1234
:/
opt/git/repository.git
.
Appending ssh://
, and adding a :
after the port number seemed to successfully act as a delimiter, and the path /opt/git/repository.git
was found (as expected) on the server.~/.ssh/config
) so that it looks like this:Host domain.com
Port 1234