push, pull and clone gets rejected

hornsen
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!
February 11, 2025

I have been using Bitbucket for years.

I always been using my repos with SSH, but yesterday I used HTTPS clone checkout on a TEMPORARY computer. At the evening I went back to my normal computer that uses SSH.

Since that evening I always get:
remote: Your credentials lack one or more required privilege scopes. unable to access. The requested URL returned error: 403

None of my existing repos can I push or pull anymore. Nor can I clone existing repos to a new folder.

I tried several times to create a new SSH keys and cloning with SSH and with HTTPS. None work anymore. 

 

ssh -T git@bitbucket.org

ssh: connect to host bitbucket.org port 22: Connection refused

 

It doesn't work from Intellij, PyCharm, WebStorm nor terminal. 

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2025

Hi @hornsen and welcome to the community.

As per your latest update, I understand that you cannot clone repos with SSH and you can use HTTPS only to clone repos but not push.

SSH

Does the issue occur with the Bitbucket Cloud account that has the same email address as your community account?

If so, I see that this Bitbucket account doesn't have any SSH keys associated with it. If this is the account you want to use, please check our docs on how to generate and add an SSH key pair:

If the issue concerns a Bitbucket account with a different email address, and you have set up SSH keys for that account:

Assuming that you use SSH only with that Bitbucket account from that computer, can you please check if there is a file named config in the ~/.ssh directory on your machine, and if there is, make sure it has the following content:

Host bitbucket.org
AddKeysToAgent yes
IdentityFile ~/.ssh/{ssh-key-name}

where {ssh-key-name} replace with the name of the private key, whose public key you have added to the account. That key pair needs to exist in the ~/.ssh directory.

If you want use SSH with multiple Bitbucket accounts from that computer, you can see our documentation below on what changes you need to make:

If you're still experiencing issues, please let me know:

  1. If you have set up SSH access for multiple Bitbucket accounts on that computer, or just for one Bitbucket account.
  2. What content specific to bitbucket.org is there in your ~/.ssh/config now (please sanitize usernames, if any)
  3. What output do you get from the following command (please sanitize repo URLs before sharing):
    GIT_SSH_COMMAND="ssh -vvv" <git command>

 

HTTPS:

If Git is configured to use a credential manager, I suggest clearing first any saved credentials for bitbucket.org from the credential manager. There may be older credentials saved that are no longer valid. Then, try to push again, and you should get asked to provide a password (please provide an app password with at least Repositories - Write permissions).

If you still experience issues:

  1. Can you please check if you have write access to the repo? If you're not a repo admin, you can ask a repo admin to double-check.
  2. Are there any branch restrictions set up for this repo, that restrict write access in certain branches to certain users only?
  3. Could you also please provide the full output of the push command (after sanitizing the repo URL)?

 

Kind regards,
Theodora

hornsen
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!
February 12, 2025

Hi and thanks for answer. In the end I decided to transfer all my repos to my GitHub account instead. Therefore, I decided to remove all my SSH keys for safety. Maybe one day I will go back to BitBucket again. Future will tell. Still thank you for taking your time.  

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2025

Hi @hornsen,

I'm sorry about the frustrating experience you've had. If you ever decide to come back to Bitbucket, I'll be more than happy to help you figure this out.

Kind regards,
Theodora

0 votes
hornsen
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!
February 11, 2025

A admin from Bitbucket mentioned there was an incident and referenced this page:
https://bitbucket.status.atlassian.com/?subscription_confirmed=true

However, that person deleted his or her message so I don't know who it was.

Apparently the incident is now marked as fixed, but still I can't clone any repository with ssh.

I can clone with HTTPS, however, I can't push any changes.
Error log says:

The requested URL returned error: 403

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events