Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

SSH Keys for System Use - Permission Denied

My goal is to use SSH keys for system use, i.e., anonymous access for non-Bitbucket users, as per the Atlassian article here:

But the procedure is not working and my system access to the Bitbucket repo is denied. Here are the steps I followed:

1. Generate public+private SSH key w/ ssh-keygen -t rsa -C "my_generic_key"

2. Copy and paste the contents of the public key into Bitbucket repository via Settings>Access Keys> Add Access Key (selected Read/Write option).

3. Add the private key to the system of choice, namely Atlassian SourceTree, by going to Tools>Options>SSH key and selecting the private key file (OpenSSH is the SSH Client, though the same poblem occurs if we use Putty/Plink and use a .ppk file).

4. Attempt to Clone the Bitbucket repository via SourceTree over SSH by clicking Clone and entering the ss://git@bitbucket.... URL.


At step 4, a Pop-Up occurs saying "The OpenSSH agent is running but the server still rejected your connection. You may need to add the correct key to your agent by selecting Tools>Add SSH Key". Even after trying to add the SSH Key again through this recommended procedure, I have the error message "Error: git@bitbucket...: Permission denied (publickey).
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists."

If I use PuTTY/Plink as the SSH Client, the error is different at this stage: "Output:
Error: The server's host key is not cached. You have no guarantee
that the server is the computer you think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 SHA256:y6OxtS49HQAqe7OHzS5JvikyL6cwQih1I/4wbcfuy4g
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
Store key in cache? (y/n, Return cancels connection, i for more info)"


But there is no where to enter y/n -- this is just a weird error message from within the SourceTree GUI.


The repository definitely exists, and the public SSH key is definitely added to the repo. I'm at a loss.

Using SourceTree 3.4.9 on Windows 10.

0 answers

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events