ssh key in sourcetree terminal

I have created a new ssh public and private keys using puttygen. copied public key in the stash server, and privatekey in  Pageant in my computer. I am able to clone the git repositories from sourcetree. Now I am trying to use git clone command from sourcetree terminal which is not allowing to use the same keys created. I copied the same public key which is earlier copied in stash to known_hosts also.

I get an error saying:

Permission denied (publickey).

fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights

and the repository exists.

 

Can you suggest how I can be able to clone or pull repository through sourcetree terminal.

 

3 answers

You don't want to put your own public key in your own known_hosts - that's for something different.

The SourceTree terminal is just the command line git client. If you don't get an answer here quickly, you might try a site with a broader audience like StackOverflow, because there are more git purists there, and they tend to have more advanced knowledge about configuring git.

Ok Seth Foss. Thank you for the help.

You might try using the "default" name for the key (id_rsa) and put it in "c:\Users\{username}\.ssh

Terminal does not seem to always look to pageant for the key list

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you