Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Public key issue with command line in sourceTree (git )

I usually use git on linux and I'm not familiar with sourceTree on windows ( c# project ), the interface is usefull to follow the tree, but I would like to the use commande line .

I really don't understand, I generated my ssh key with sourceTree agent and load with "Pageant", I added the public key on my bitbucket account.

And it works. I can clone/pull/push from the sourceTree interface

fetch with sourceTree's interface

But using the sourceTree command line mode doesn't work

command line doesn't works

like image 962
amdev Avatar asked Oct 13 '14 14:10

amdev


People also ask

How do I enable git in Sourcetree?

In SourceTree, adjust the following setting: go to Tools > Options > Git > Git Version and select "Use System Git".

How do I push code from github to Sourcetree?

Push changes from a local repository to a remote repository Click Push in the toolbar. Select the local branch to push and the remote branch to push to. Click OK.


1 Answers

  1. Set SSH Key to a PuTTY private key (.ppk) and set SSH Client to PuTTY / Plink
  2. Set an environment variable GIT_SSH to the path of plink.exe, for example C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\plink.exe

Of course you could have a separate, global OpenSSH key in %HOMEPATH%\.ssh\id_rsa but then you would lose the advantage of SourceTree loading the correct key automatically.

By the way, I can confirm that neither of these work:

  • Setting SSH Key to an OpenSSH private key and using OpenSSH as SSH Client
  • Setting SSH Key to a PuTTY private key and using PuTTY / Plink as SSH Client
like image 98
AndreKR Avatar answered Oct 26 '22 23:10

AndreKR