Public key issue with command line in sourceTree (git )
Asked Answered
C

4

6

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

Cheeks answered 13/10, 2014 at 14:1 Comment(0)
T
0

you need to generate public key from console.

like this

 ssh-keygen

it will generate public key that you can add it in Bitbucket

for more info visit this Tutorial

Trinee answered 14/10, 2014 at 18:30 Comment(0)
K
4
  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
Kennithkennon answered 19/2, 2015 at 14:45 Comment(1)
This worked for me. Specifically, it was the missing GIT_SSH environment variable that caused the problems. Once that was added with the path to my own separate installation of PuTTY's PLINK.EXE, all was well.Ainsley
P
1

Nothing of the above was necessary to make it work for me. The only necessary aspect to consider is that by default git (and maybe other apps) expect your ssh key in c:/users/<user>/.ssh. Mind the dot! After I renamed my ssh folder to .ssh all started working fine.

Planck answered 24/7, 2015 at 12:34 Comment(0)
T
0

you need to generate public key from console.

like this

 ssh-keygen

it will generate public key that you can add it in Bitbucket

for more info visit this Tutorial

Trinee answered 14/10, 2014 at 18:30 Comment(0)
B
0

"C:\Users\username\AppData\Local\SourceTree\app-3.4.8\tools\putty\plink.exe" bitbucket.org

change username and app-

Bantu answered 28/7, 2023 at 8:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.