Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does Sourcetree require SSH keys

Craig Motell January 4, 2016

Dear Atlassian,

My company uses Stash for its GIT repository. A common clone command is something like:

 

git clone ssh://git@stash.mycompany.com:7549/code/mycode.git.

Problem is that port 7549 is being blocked.

Is there a way to either use port 443 or bypass?

 

  1. For example, does SourceTree cloning require specialized ports?
  2. Or is there an on-demand way to use another port that is acceptable to where I'm physically working?

Thank You,

Craig

 

2 answers

1 accepted

0 votes
Answer accepted
rrudnicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 5, 2016

Hi Craig, 

 

What happens if you try the following command? (Make sure your stash is listening on port 443)

git clone ssh://git@stash.mycompany.com:443/<accountname>/<reponame>/

 

Regards, 

Renato Rudnicki

Craig Motell January 5, 2016

Thanks, that is good advice. I did try it and got the error ssh: connect to host stash.mycompany.com port 443: Bad file number. But it was worth trying:)

1 vote
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2016

You can always use the https (or http depending up on your configuration) protocol for connecting to your repo. Get the clone url from your repository.

Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2016

In Stash, when you hit "Clone", the box that says "SSH" is a pull-down, and you can select "HTTP" instead to see the HTTP URL, which should be something like: http://user@stash.mycompany.com/scm/code/mycode.git - maybe with a port number thrown in there.

Craig Motell January 4, 2016

first thank you for the quick responses! I did try something like https://craig.motell@mycompany.com@stash.mycompany.com/scm/code/mycode.git and https://craig.motell@stash.mycompany.com/scm/code/mycode.git very close to what you recommend, but it brings me to the repository and doesn't clone the code. The URL is the one recommended by stash when you First Select clone and then select "HTTP" vice "SSH". So maybe missing something, like adding a clone command to the URL or password? Thank you

Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2016

Where are you putting that URL? it should be part of the git command, like "git clone <url>" at the git command line or configured as the URL for the repo in SourceTree - not entered directly into a browser

Craig Motell January 4, 2016

Tim, Trying to go away from command line. The command requires a port number in the SSH command, which I can't use. But you may of hit on something. Maybe I need to get SourceTree for the HTTPS command to work. I was trying to use an HTTPS URL outside of SourceTree because SourceTree is not currently allowed in Company. So perhaps should try and get SourceTree to proceed with HTTPS type of cloning? Thanks

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 4, 2016

You do no need Sourcetree for https. It should work from command line. Are you doing "git clone <url>"? What are you getting when you do that?

Craig Motell January 5, 2016

Jobin, Thanks the problem discussed here is that I can seem to use command line. In particular, the port number is required and not allowed through company firewall. I'm going to see if company will allow SourceTree as my next option. Appreciate your response.

Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2016

If the traffic is being blocked at the firewall, it's not going to matter whether you use SourceTree or the git command line. SourceTree is just a graphical frontend for git. Whether using SourceTree or the git command line or any other git client, you'll need to specify the URL for your repo - which can be either an SSH url or an HTTP url.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events