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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,459,361
Community Members
 
Community Events
176
Community Groups

Bitbucket Git Submodules with SSH Keys and valid permissions are NOT cloning

I have a valid id_rsa.pub ssh-key copied into my Bitbucket user settings. I can clone any top-level repo that I have access to.

I can also validate that my id_rsa.pub works by running:

ssh -vT git@bitbucket.org
[...]
Authenticated to bitbucket.org ([104.192.143.2]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
logged in as **REDACTED**.

BUT when I clone a top-level repo with submodules and run:

git submodule update --init --recursive"

# I see many "Permission denied (publickey") messages to repos I also have permission to

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

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

I can clone my submodules over ssh individually, NO PROBLEM. Just when the top level repo attempts to update all the submodules, it fails. 

What is going on?

(((  I do not want to use https for submodules. )))

 

2 answers

Found this too, make sure you connect to the submodule repo with the right user (git@bitbucket.org)

When no username is given ssh uses the current user, who has no permissions on bitbucket.org

0 votes
Ana Retamal Atlassian Team Dec 29, 2017

Hi Bartosz! Are you still experiencing this issue? If you are, please give us more info so we can continue helping you:

- Are you using Bitbucket Server or Cloud?

- Where are you cloning the repositories from? Where are you cloning them to?

Best regards,

Ana

Deleted user Mar 07, 2018

I'm not the reporter but I have this issue. I'm using bitbucket cloud and cloning repositories to the my local e: drive. 

git version 2.16.2.windows.1

cmd line: git clone --recurse-submodules git@bitbucket.org:orgname/reponame.git

Deleted user Mar 07, 2018

Solved it, if anyone else comes looking make sure your ssh key does not have a passphrase.

Like Alexander_007 likes this

Surely having a passphrase on an ssh key is considered best practice. 

I don't think this is the genuine root cause of this issue. 

I am also facing the same issue and I do not have any passphrase for my ssh key. 

Same issue here. Both repositories are mine, both with SSH key (the same), both can be cloned without any issue. 

I'm getting the same error while trying to clone the submodule. 

Like yanping.li likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events