You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm having a problem across platforms (Pantheon, Platform.sh) where I have scripts that are set up to clone public repositories in public projects — and the scripts are failing saying that permission is being denied based on the public key. When I add the public key to my organization, then the clone succeeds. However, there are certain contexts in which I won't know the public key ahead of time. What gives?
The SSH protocol requires both the client and the server to authenticate before sending any requests and Bitbucket Cloud only supports public key authentication. When you use SSH, authentication is always required for both public and private repos.
If you want to use SSH, you will need to set up SSH keys in order for the clone operation to work. The private SSH key needs to be on the machine that performs the clone operation and the public key should be added either as an Access key to the repos, or to a user with access to the repos. It is also possible to add the public SSH key to the workspace that owns the repos, but we advise using this option with caution, as in this case, we cannot track which user performed a certain operation.
If for whatever reason, it is not possible to set up SSH (in time), another option is to use HTTPS to clone, which will not require authentication for public repos.