Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Test SSH config in SourceTree terminal fails

We have a script that tests our user's development environment to make sure everything is set up correctly.  To test that SSH is setup the script runs 

ssh -T

which is straight from Atlassian's trouble shooting page:


For some reason though, one of our SourceTree users fails this test even though their SSH connection to bitbucket is working fine.  They can run git pull or push without and trouble but when they run the command above they get:

$ ssh -T Permission denied (publickey).

Upgrading to SourceTree 3.1.3 and the latest embedded git gave the same result

Any ideas?



1 answer

0 votes
Mike Corsaro Atlassian Team Jun 14, 2019


This probably has to do with any of the following:

  • The path to SSH is not the same as the other machines (check environment variables)
  • The SSH key info is being saved to .gitconfig in another location (I think the way git feeds SSH info to git is different than just running ssh -T). Run the following command to see where all git configurations come from and compare it to the working machines:
    git config --list --show-origin

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

7,021 views 5 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you