Reputation: 7037
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?
Upvotes: 458
Views: 221614
Reputation: 6273
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:
Upvotes: 7
Reputation: 462
I just got into this problem, but I installed GitCredentialManager from here and when I tried to clone a repository, this opened up a window to make an OAuth with Bitbucket, and internally this credential manager took managed everything. I'm using a MacBook pro by the way.
Upvotes: -1
Reputation: 6069
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:
Upvotes: 594
Reputation: 818
The correct solution I guess is as follows:
First lot out from the account. Then click in "can't login". After that you will be able to recover your email. So, you will get recovery link and click on that email and set new password.
Upvotes: 0
Reputation: 11
I found this while reading the docs:
Doesn't know whether it works and you have to enter your Google password!
Upvotes: -1
Reputation: 6986
You can setup SSH key authorization like described here - https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/.
Upvotes: 8
Reputation: 230
Follow these steps:
steps updated as on 13th July 2020 Thank You: Rahul Daksh
Upvotes: 4
Reputation: 7037
Solved:
forgot my password
.Sample:
git clone https://<bitbucket_id>@bitbucket.org/<repo>
Upvotes: 169
Reputation: 17276
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!
Upvotes: 36
Reputation: 1730
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.
Upvotes: 4
Reputation: 3830
One way to skip this is by creating a specific app password variable.
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.
Upvotes: 18
Reputation: 5819
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.
Upvotes: 2