0

I'm trying to connect to a BitBucket Git account using SSH at work. The network admin has blocked the 22 port (used by default for SSH) so I'm trying to connect using port 443 (the https port).

The problem is, where do I configure that in my Atlassian SourceTree client? If I try to connect to bitbucket.org:443 (in a Git bash terminal window) by using:

ssh -v [email protected] -p 443

The program establishes a connection, but now my problem is to configure that port in the Git client (I don't see any port configuration setting in the Options dialog inside SourceTree).

Thanks in advance for any help.

Edit - In Linux there's a .ssh/config file where one could edit the host configuration (including the connection port), but AFAIK my Windows client don't uses that config file because it establishes SSH connection using the PuTTY agent.

2
  • Have you tried specifying the port as part of the url? Something like ssh://[email protected]:443/.... Given that it is configured based on url, this may work.
    – Lucas
    Aug 5, 2013 at 16:10
  • @Lucas - I don't think that could work: the url uses the colon in that uri to specify the user, like this: [email protected]:user/my_repo.git ... or maybe is another way to specify that? Aug 5, 2013 at 16:18

2 Answers 2

2

After some research it seems that BitBucket no longer allows SSH on 443 port (official info in this link). So I'm stuck (for now) with https for my in-work connections.

Anyway, one could solve my "original problem" by changing the way SourceTree connects using SSH (from Plink to OpenSSH, see picture below). That way the program would use the ~/.ssh configuration and key files to establish a connection (as in Linux) and that config file could use a different port (see this link for a further explanation on this).

SourceTree's SSH Client Configuration

1
0

Ok, so this would be a hack, but, SourceTree uses plink. It has its own copy that it keeps in C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\plink.exe. You could rename that file to C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\actualplink.exe and create a batch file called C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\plink.bat. In that file you could

C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\actualplink.exe -P 443 %*

Note, this is not tested, and depends on how SourceTree actually executes plink, but it I think it just might do the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.