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

Issues with Write Access to Repositories Despite Adding SSH Keys and App Passwords

bittnkr
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 22, 2024

Hello Bitbucket Community,

I am encountering persistent issues with read and write access to my repositories, despite trying multiple solutions. Here's a detailed description of the problem: I

Background:

  • I have two Bitbucket accounts: personal and work.
  • The project in question resides in my personal account.
  • The work account has been invited as an admin and has accepted the invitation.
  • SSH keys and app passwords have been generated and added accordingly.
  • Running Ubuntu Linux

Steps Taken:

  1. Added SSH keys for both personal and work accounts.
  2. Generated and used app passwords for authentication.
  3. Added the work SSH key to the personal repository.
  4. Cloned the repository using work credentials.

Current Issues:

  • Despite adding the work SSH key and being an admin, I can only read but cannot write to some repositories.
  • For some repositories, I can't even clone them.
  • SSH authentication its working.

Commands and Responses:

  • Cloning the repository:

    sh
    Copy code
    git clone git@bitbucket.org:personal_username/repository.git
    • Response: Cloning succeeds but with read-only access.
  • Attempting to push changes:

    sh
    Copy code
    GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push origin master:master
    • Response:
      vbnet
      Copy code
      Unauthorized fatal: Could not read from remote repository. Please make sure you have the correct access rights.

Additional Information:

  • Running git remote -v shows the correct URLs for fetch and push.
  • git branch -r lists the branches correctly.
  • Both personal and work accounts have SSH keys listed in their respective settings.

What I Have Tried:

  • Generated new SSH keys and app passwords multiple times.
  • Added SSH keys to both personal and work account settings.
  • Ensured the repository settings allow write access for the work account.

Despite these efforts, I am still unable to get write access to the repositories from my work account. I can see the repositories in the dashboard but face issues with cloning and write access.

Request:

  • Could someone help me identify what might be causing this issue?
  • Are there any additional settings or configurations I need to check?
  • Any steps I might have missed in setting up access properly?
  • Any way to reset this access cleaning up any inconsistencies?

Thank you in advance for your assistance.

Best regards,

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2024

G'day, @bittnkr 

Welcome to the community!

That's an interesting workflow. My question is, when you mention having two accounts, does that mean a Bitbucket account with two different email addresses? If yes, then I believe the reason you are unable to clone the repository was that it was added under the repository level, which only allows for read access and not write.

If you have two different Bitbucket accounts, the solution is to use two separate SSH keys on each account. You can check our guide below on how to manage multiple SSH keys on a single machine specifically if you have two Bitbucket accounts:

Managing multiple Bitbucket user SSH keys on one device 

Regards,
Syahrul

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