It is still connected to my local GIT repository by user name. How can I access that remote repository if I don't know/have access to the email address and I can't log in by user name?
Hi Scott and welcome to the community!
I'm afraid that we cannot share an account's email address for privacy reasons.
If you remember the username of the account and if you have an app password for this account that has at least Account: Read permissions, you can use the following API endpoint to get the email addresses associated with this account:
Example with curl:
curl -u Bitbucket_Username:App_Password -X GET -H "Content-Type: application/json" https://api.bitbucket.org/2.0/user/emails
If there are email aliases in your account they will be returned as well, but the field is_primary will indicate the primary email of the account that you need to log in with. Please note that the API call requires an app password for authentication and not the account's password, as we have deprecated the use of account passwords for API.
If you don't remember the username or if you don't have an app password for that account, then I would suggest trying to log in to https://bitbucket.org/ from browser with any of the email addresses you own, and see if any of them logs you into the correct account. In case you use GMail, please keep in mind that myemail@gmail.com and my.email@gmail.com share the same inbox in GMail, but for Bitbucket they are considered separate email addresses.
You can also check the Git config on your computer with the command
git config --list
and see in the output what emails you have set for user and/or author. The Git config email can be set manually by a user and it is not necessary that it is same as the Bitbucket account's email. However, it may be, so I suggest checking it.
Please note that if you get asked to give a username and create a new account after logging in with a certain email, this means that there is no Bitbucket Cloud account with that email as primary, so you can skip that email from the process.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.