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

Cannot clone from public repositories without SSH Key

Tyler Brown Cifu Shuster December 17, 2021

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?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2021

Hi @Tyler Brown Cifu Shuster,

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.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events