0

Is Stash only meant for Sourcetree, as it's not able to do it from console in windows? I have cloned the project from stash.

But I'm unable to push or pull from command prompt, whereas I can do it from Sourcetree to that particular project folder.

Error:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

So is it separately treated or am I doing anything wrong in SSH key setup? Is it a mistake of source tree or Windows machine?

Last question: How can I add multiple ssh keys for different account to it because default directory is: C:\Users\%user%\.ssh

SQB
  • 3,926
  • 2
  • 28
  • 49
Mithun Shreevatsa
  • 3,588
  • 9
  • 50
  • 95
  • 1
    In the Sourcetree options, did you check where your public SSH key is stored? Maybe it's another location compare to C:\Users\%user%\.ssh. – Bruno Lavit May 27 '15 at 13:30
  • @BrunoLavit, its an different directory, it stores in different location: `C:\Users\%username%\[SSH]\project_1`. Its serving from this directory, but its not happening from command prompt, i think command prompt stores with `C:\Users\%user%\.ssh`. How to handle this scenario – Mithun Shreevatsa May 28 '15 at 06:13
  • On Linux, we have one public key per user and we use this key with our Stash account. On Windows, it should be similar. For your username (ex: joe), generate a public key (C:\Users\joe\.ssh\id_rsa.pub). Next, associate this public key with your Stash account. After, you should be able to push/pull with the command prompt (and it should also work with SourceTree). – Bruno Lavit May 28 '15 at 09:45

1 Answers1

0

Stash works with any git client. It looks like your command line client is not using the same SSH key as you're using from SourceTree

Rog
  • 4,075
  • 2
  • 24
  • 35
  • Yeah, you are right. so how to handle this? I mean how to have multiple ssh keys for different accounts in windows instead of just **id_rsa.pub** always in **.ssh** folder – Mithun Shreevatsa May 28 '15 at 11:09