Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Sourcetree cannot read from remote repository when ssh URL contains a port

When cloning a repository with a port number in the URL, Sourcetree is unable to read the remote repository.
This is an example of the repository being cloned.
ssh:// -v
Error: plink: unknown option "-p"
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Sourcetree is TortoiseGit: is running concurrently with Git v.2.16.2 and  OpenSSH_7.6p1.

TortoiseGit will push/pull/clone OK.  SourceTree is unable to see the remote repository.

Previously TortoiseGit received "Fatal: ssh variant ‘simple’ does not support setting port." Adding git config --global ssh.variant to the Git config allows Tortoise to push/pull/clone. We can get either Tortoise or Sourcetree working individually, but not together.

The problem is both versions of TortoiseGit and Sourcetree of with different version numbers were working well together prior to the Git v 2.16.2 update.

I've done as much troubleshooting and tweaking as possible. Both the system git and embedded git are at 2.16.2. SourceTree does not seem to differentiate between the System Git and Embedded Git.
Embedded git points to: C:\Users\connolr\AppData\Local\Atlassian\SourceTree\git_local\cmd\git.exe
System Git also points to: C:\Users\connolr\AppData\Local\Atlassian\SourceTree\git_local\cmd\git.exe
The expected behavior would be C:\Program Files\Git\bin\git.exe

Is SourceTree reading Putty instead or plink? TortoiseGit seems to read the public/private key pair OK, but Sourcetree seems to not recognize it. Is there a setting or something to add in the config file that allows SourceTree function concurrently with TortoiseGit and bash?

Thank you.

1 answer

0 votes
Mike Corsaro Atlassian Team Apr 26, 2018

Hello! Could you try upgrading TortoiseGit to version 2.6? There seems to have been an issue with this in older TortoiseGit versions that may fix this.


Sidenote: if "System Git" is pointing to that local path then it's because your PATH environmental variable for Git isn't pointing to the right location. You might want to check that and see where it's pointing to.

Thank you Mike!

After installing TortoiseGit 2.6 I was able to clone/push/pull with both SourceTree and TortoiseGit.   

You're correct about the "System Git" path.  It was pointing to: C:\Users\username\AppData\Local\Atlassian\SourceTree\git_local\bin. After changing the path to C:\Program Files\Git\cmd in the Environmental variables Sourcetree recognized it.

SystemGit Path.PNG


BTW These two posts were helpful with determining what Git.exe to use.



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...

3,387 views 4 5
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