how to remove previous user artifacts
Asked by Jason Cloete:

The best way to describe this problem is to use a case study with name-changes.

Lets assume my name is Robert Paulson, and I just started working at Google. I have been assigned the email address of robert@google.com.

It turns out that once upon a time there was another Robert employed at Google (full name Robert Smith), and he had also been issued the email address of robert@google.com. Mr Smith was using this email address with his BitBucket account to access company files. Mr Smith then left Google before I started ...

Now, when I (Robert Paulson) log in to BitBucket using my robert@google.com email address for the first time, I am still presented with Robert Smith's (empty) BitBucket account. I am unable to change the name of the account (inside Personal_Settings\>Account_Settings).

The main issue is that **I am unable to clone a repo** using git terminal commands. When issuing the ++git clone++ command, I get hit with the following error (even though I am able to view the repo files on Bitbucket webpage):

"Forbidden  
fatal: Could not read from remote repository. Please make sure you have the correct access rights"

Please note that I have added new ssh keys several times to try and debug what has been going on, and this doesn't *seem* to be the issue. When I run ++ssh -T git@bitbucket.org++ I receive the following response:

"authenticated via ssh key. You can use git to connect to Bitbucket. Shell access is disabled"

<br />

I was, however, able to clone repos from within GitKraken. I was also **not able to initialize submodules** from within GitKraken, or with terminal commands.

My feeling is that there are artifacts/remnants of Robert Smith's old BitBucket account interfering with my current Robert Paulson account. When I click on my avatar at the bottom left, it shows the name Robert Smith (not me). Please can someone clarify.


Answers:
author: Theodora Boudale
body: Hi Jason,

If there was an existing Bitbucket Cloud account with the company email you are using, it is expected that logging in with that email will log you into that existing account.

++In order to change the name of the account++ , if you go to **Personal Settings \> Account Settings**, you will see in there a line

```
Update your avatar, name, email address, and password or delete your account through your Atlassian account.
```

The text **Atlassian account** in that line is a link. If you select it, the following page will open:

* <https://id.atlassian.com/manage-profile/profile-and-visibility>

If the Atlassian account is not managed by your employer, you should be able to change both the **Full name** and **Public name** fields from that page. Otherwise, if these fields are not editable, it means that the Atlassian account is managed by your employer, and you'll need to reach out to the person who manages the Atlassian accounts in the company so that they change it for you.

++Regarding the issue with SSH:++

If you have created a new SSH key pair, and you added the public key to this Bitbucket account from **Personal Settings \> Account Settings \> SSH keys**, then the issue may not be related to the fact that this account already existed.

You mentioned that you can clone from GitKraken but not from terminal; GitKraken may be using a different SSH key or may be configured to use HTTPS instead of SSH.

I suggest that you try cloning from terminal using the following command:

```
GIT_SSH_COMMAND="ssh -v" git clone git@bitbucket.org:<some-workspace>/<some-repo>.git
```

In the output, you will see a line that starts with

```
debug1: Offering public key: <path to the ssh key>
```

If the path is e.g. **/Users/my-user/.ssh/id_rsa**, then check the content of the public key with the command

```
cat /Users/my-user/.ssh/id_rsa.pub
```

to see if it's the same key uploaded to your Bitbucket Cloud account.

I would also suggest checking:  
- if there are multiple SSH key pairs in **/Users/my-user/.ssh**   
- if there is a file named **config** in **/Users/my-user/.ssh**, and if so, check the content of this file to see if there is any configuration specific to bitbucket.org

If you have multiple SSH keys in that directory, and you work with only one Bitbucket Cloud account from your machine (e.g. the key /Users/my-user/.ssh/id_rsa), you can also add the following entry to the config file, to specify which SSH key should be used for Bitbucket

```
Host bitbucket.org
    HostName bitbucket.org
    IdentityFile /Users/my-user/.ssh/id_rsa
```

If you're still having issues, you can clone using the following command:

```
GIT_SSH_COMMAND="ssh -vvv" git clone git@bitbucket.org:<some-workspace>/<some-repo>.git
```

and then attach the full output of the command here (replace any sensitive/private info from the output prior to sharing it), so I can take a look.

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud