Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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!


I created an SSH key pair under Windows, but can't clone my repo

I believe I successfully created an SSH key pair under Windows and added the public key to Bitbucket Cloud, as ssh -T returns the expected output. However, when I try to clone the remote repo on my local PC I get this: (I X'ed out the repo name)

$ git clone
Cloning into 'XXXXXXX'...
Bad owner or permissions on C:\\Users\\jff/.ssh/config
fatal: Could not read from remote repository.

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

Any suggestions?

1 answer

1 accepted

0 votes
Answer accepted
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 29, 2023

G'day @jim-frenzel 

Based on the error message, there are two issues with your ssh.

The first one is "Bad owner or permissions on C:\\Users\\jff/.ssh/config" error message, which happens when the .ssh folder doesn't have the right permission. It can happen if the inheritance option is enabled on the .ssh folder. Can you review the following threads here and try the suggested workaround to see if that fixes the issue?

As for the second issue, I believe the wrong SSH key is being used with your git clone hence you are getting the "fatal: Could not read from remote repository.". To identify this, simply clone with the following verbose commands:


From the verbose log, identify your private ssh key name and check if it's being offered to git while cloning? If not then I suggest you manually add the following in the 

/Users/<name>/.ssh/config to explicitly ask SSH to use the default key only:
  1. Run the following command, replacing the {ssh-key-name} with the name of the private key:

    ssh-add ~/{ssh-key-name}
  2. To ensure the correct SSH key is used when connecting to Bitbucket, update or create your SSH configuration file (~/.ssh/config) with the following settings:

     AddKeysToAgent yes 
    IdentityFile /Users/<name>/.ssh/{ssh-key-name}


    Where {ssh-key-name} is the location of the private key file once it has been added to the ssh-agent.

Let me know how it goes.


Many thanks Syahrul! (Sorry for the delay - I had to wait until I got home from work to try things out.)

The problem turned out to be the permissions on the .ssh folder. (I had previously run ssh-add and modified the config file as you suggested later in your post.)

I looked at the thread you mentioned to fix the permissions and did the following:

1. Selected "Advanced" for the .ssh folder security properties.

2. Selected disable inheritance as suggested here: "When you are disabling the inheritance you will be asked if you want to copy the current inherited access rights. Select yes and then continue by removing the other user as described above."

3. Removed the Administrator and another admin account - leaving only SYSTEM and my account.


I had previously run ssh-add and modified the config file as you mentioned as the possible

Like Syahrul likes this

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events