Bitbucket app password login fails

Tarmo Kuuse October 28, 2016

Hi!

I seem to be having trouble authenticating to my Bitbucket repo using App Passwords.

Here's what I did (following https://blog.bitbucket.org/2016/06/06/app-passwords-bitbucket-cloud/)

  1. Enabled 2-factor authentication
  2. Created a test repo with some dummy data
  3. Created an App Password, granted every permission possible
  4. Tried login via git command-line client:
    git clone https://apppwd_user:apppwd_pass@bitbucket.org/tarmokuuse/testrepo0.git

Login fails with the following message

Cloning into 'Testrepo0'...
remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.
fatal: Authentication failed for 'https://apppwd_user:apppwd_pass@bitbucket.org/tarmokuuse/Testrepo0.git/'

Can anyone point out what's wrong here? Regarding the hint about the account password, I am using the Atlassian account which has a password set. I don't believe it's possible to have it any other way...

FYI: I am, in fact, trying to enable submodules in my Bitbucket Pipelines, which seems to require such hacks to work: https://answers.atlassian.com/questions/39445805. Login fails there in exactly the same way.

4 answers

1 accepted

20 votes
Answer accepted
Tarmo Kuuse October 28, 2016

Oh, I'm not supposed to use the name of the App Password as the login user, but rather my own user name. That's unexpected.

Thanks for the hints smile

Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 28, 2016

Sure thing smile

Like Anand Kumar likes this
Tarique Khan July 8, 2018

same issue for me, resolved.

Like # people like this
Ronan Pereira August 12, 2020

same issue here. That helped me a lot

Like Anand Kumar likes this
Uday March 16, 2021

Hi Tarmo,

Even If I use my username and password with https option for git clone, I often face this issue (requires single sign-on and create app password).

Creating app password and using the same with current username instead of the account password, will it resolve the problem?

Thanks in advance,

Uday

1 vote
Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 28, 2016

Hi Tarmo,

What value are you using for apppwd_user?

Alastair

0 votes
Soma Chakraborty September 2, 2020

Hi, 

How do we use app password for git commit and push? 

Currently getting follwoing error when trying to commit my changes:

"Because your Atlassian account admin requires single sign-on, you'll need to authenticate with an app password. Create an app password at https://bitbucket.org/account/admin/app-passwords

fatal: unable to access 'https://bitbucket.org/xxx/xxxxxxxxx.git/': The requested URL returned error: 403"

Ronan Pereira September 3, 2020

It depends on where are you trying to accessing from. There are some tools that have specific fields for username and password, other you can inform it in the URL.

I'm not completely sure, but I think it's https://username:password@bitbucket.org/[your_repo] os something like that.

Anyway, the most important thing to note is that, even after creating your app password, you must use your own bitbucket's "username" with your app's "password". That's the trick

Soma Chakraborty September 3, 2020

Hi Ronan, 

 

Thanks for your reply. 

I was able to push my change the way you suggested using following command:

git push [branch name]https://username:password@bitbucket.org/[my repo].git

 

Best,

Soma 

Like # people like this
Ronan Pereira September 3, 2020

Hi Soma,

I'm glad that it helped

Cheers,

Ronan

0 votes
Karma Tsering Lama January 2, 2018

I had an similar issue. In the url make sure you are using ur id and the the system will ask for your password. Problem solved

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events