Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Ned access to my workspaces

IanHobson March 31, 2025

Hi, 

I have one account, with two bitbucket workspaces, containing a total of 4 repos. 

I am the administrator of all 4 repos, and I can log into bitbucket using the password from my password manager. 

I am trying to set up a new development machine, so I need to clone each repo. 

When I clone a repo using ssh, I get a failure message about keys, but I can find no documentation about setting up a key file. 

When I choose to clone using HTTPS, I am prompted for a password. I enter my bitbucket password, I get thrown out with a password failure. 

Also, not only do I need access to clone the repos, I need access to push to them also. 

Clearly there is something I don't know or understand. 

How should I proceed?

Ian

1 answer

1 accepted

0 votes
Answer accepted
John Emmanuel
Contributor
March 31, 2025

 Hi Ian,

You need to set up SSH keys for your Bitbucket account. Based on the information you provided, you have two workspaces and four repositories, where you are the admin. This should grant you permission to clone and push via SSH.

Step 1: Access Your SSH Key Settings

Go to your Bitbucket personal settings page:
https://bitbucket.org/account/settings/ssh-keys/

Here, you can see all SSH keys associated with your account. Click on "Add key" to add a new SSH key.

Step 2: Retrieve Your Public SSH Key

You need to copy your public key from the system you will be using to connect to Bitbucket.

On Linux/macOS
Run the following command in a non-root terminal:

cat ~/.ssh/id_rsa.pub

On Windows (PowerShell)
Run:

Get-Content $env:USERPROFILE\.ssh\id_rsa.pub

If You Don’t Have an SSH Key Yet:
Generate a new SSH key pair using: 

ssh-keygen -t rsa -b 4096
Press Enter through all prompts to use the default values.

(Note: RSA is widely used, but you may also explore other key types like Ed25519 for better security.)

Step 3: Add the SSH Key to Bitbucket

Once you have retrieved your public key, copy its contents and paste it into the SSH Key field on Bitbucket.

After saving, you will be able to clone and push via SSH instead of HTTPS.

Let me know if you run into any issues!

Regards,

John :)

IanHobson April 1, 2025

John,

A huge thank you from me. 

Your reply not only gives me the information I need to sort my problem, but you included information others may need later. 

The only issue I have is that my set up is a mess. First is to decide if I want one keyfile for bitbucket, one per machine or one per user. 

One per user appears most secure, and is manageable with only 3 users. 

Thanks again. 

Ian

John Emmanuel
Contributor
April 1, 2025

You are welcome :)

 

SSH keys are ideal for users who need to clone or commit from a remote repository to their personal or work machine. Once set up, you'll need to enter your email or username when committing for the first time, allowing Git to associate your commits with your identity.

Since SSH keys are tied to a specific user, using them on a shared system can lead to confusion and access issues. Instead, I recommend using App Passwords: https://bitbucket.org/account/settings/app-passwords/. With this approach, you can clone repositories using the HTTPS method instead of SSH. When cloning, you'll be prompted to enter your Bitbucket username (refer to here: https://bitbucket.org/account/settings/ ) and the app password you created.

App Passwords also allow you to restrict access by specifying read or write permissions for repositories (to which you have access). While this may or may not suit your needs, it ensures that authentication is entered manually rather than being permanently stored on your system or workstation. You can also consider creating a separate user (call it a system user) and use those credentials for common or shared systems. You can give access to specific repos only that way.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events