[git] Bitbucket git credentials if signed up with Google

I have an account on bitbucket.org that I created by signing up with my Google account. Now everytime I log in I just click "Log in with Google" and that's fine.

How can I access my repos from git command line? It requests me username and password. I have a username, but no password. How do I log in then?

This question is related to git bitbucket google-account

The answer is


Update as at September, 2019:

This whole process is now way easier than it used to be. It doesn't matter if your auth style is regular or Google-dependent, it works regardless. Follow these four easy steps:

  • Visit this link and enter your email.
  • Check your mail for the reactivation email and click the big blue button therein.
  • Change your password!

I hope this helps. Merry coding!


You should do a one-time setup of creating an "App password" in Bitbucket web UI with permissions to at least read your repositories and then use it in the command line.

How-to:

  1. Login to Bitbucket
  2. Click on your profile image on the right (now on the bottom left)
  3. Choose Bitbucket settings (now Personal settings)
  4. Under Access management section look for the App passwords option (https://bitbucket.org/account/settings/app-passwords/)
  5. Create an app password with permissions at least to Read under Repositories section. A password will be generated for you. Remember to save it, it will be shown only once!
  6. The username will be your Google username.

You can setup SSH key authorization like described here - https://confluence.atlassian.com/bitbucket/add-an-ssh-key-to-an-account-302811853.html.


It's March 2019, and I just did it this way:

  1. Access https://id.atlassian.com/login/resetpassword
  2. Fill your email and click "Send recovery link"
  3. You will receive an email, and this is where people mess it up. Don't click the Log in to my account button, instead, you want to click the small link bellow that says Alternatively, you can reset your password for your Atlassian account.
  4. Set a password as you normally would

Now try to run git commands on terminal.

It might ask you to do a two-step verification the first time, just follow the steps and you're done!


You can attach a "proper" Bitbucket account password to your account. Go to https://id.atlassian.com/manage/change-password (sign in using your Google account) and then enter a new password in both the old and new password boxes. Now you can use your email address and this new password to access your account on the command line.

Note: App passwords are the official way of doing this (per @Christian Tingino's answer), but IMO they don't work very nicely. No way of changing the password, and they are big unwieldly things to type into the command line.


you don't have a bitbucket password because you log with google, but you can "reset" the password here https://bitbucket.org/account/password/reset/

you will receive an email to setup a new password and that's it.


Follow these steps:

  1. login to bitbucket
  2. Click on Personal Settings
  3. Click on Create App Password, here give permission to read and write and the login to GitHub desktop using the same password. Note: Take a screenshot of the password as you won't retrieve it again.

steps updated as on 13th July 2020 Thank You: Rahul Daksh


One way to skip this is by creating a specific app password variable.

  1. Settings
  2. App passwords
  3. Create app password

And you can use that generated password to access or to push commits from your terminal, when using a Google Account to sign in into Bitbucket.


Examples related to git

Does the target directory for a git clone have to match the repo name? Git fatal: protocol 'https' is not supported Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) git clone: Authentication failed for <URL> destination path already exists and is not an empty directory SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 GitLab remote: HTTP Basic: Access denied and fatal Authentication How can I switch to another branch in git? VS 2017 Git Local Commit DB.lock error on every commit How to remove an unpushed outgoing commit in Visual Studio?

Examples related to bitbucket

How to markdown nested list items in Bitbucket? Your configuration specifies to merge with the <branch name> from the remote, but no such ref was fetched.? Bitbucket git credentials if signed up with Google What I can do to resolve "1 commit behind master"? Bitbucket fails to authenticate on git pull Change remote repository credentials (authentication) on Intellij IDEA 14 git: updates were rejected because the remote contains work that you do not have locally How do I push a local repo to Bitbucket using SourceTree without creating a repo on bitbucket first? Clone private git repo with dockerfile How to move git repository with all branches from bitbucket to github?

Examples related to google-account

Bitbucket git credentials if signed up with Google Accessing Google Account Id /username via Android