Invalid credentials when connect from intellij
Asked by John Sheng:

Hi,

I use my company email to login bitbucket cloud, I got this url for my repository:  
git clone <https://johnsheng@bitbucket.org/wd-extend/sweden-tax-form.git>

I tried to access it from 3 client tools  
1) Intellij -\> my main goal is to make this work  
2) Visual Studio Code  
3) Mingw64

it prompt me to enter my credential, default to be my username (johnsheng, without company_domain.com), and I enter the password, and after about 1 min, it error out with following error message.

\> git clone <https://johnsheng@bitbucket.org/wd-extend/sweden-tax-form.git>   
fatal: Invalid credentials  
remote: Invalid credentials  
fatal: Authentication failed for '<https://bitbucket.org/wd-extend/sweden-tax-form.git/>'

![bitbucket.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/187359i095080E05031B91F/image-size/large?v=v2&px=999 "bitbucket.JPG")

How can I make it work?


Answers:
author: Nirmal Seneviratne
body: Hi,

The issue is they have stopped supporting bitbucket account passwords when using Basic authentication for Git. Below is the announcement.

<https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231>

Solution is, you have to create an app password in the bitbucket account settings. Below link has the steps.

<https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

Copy the password because you see it only once.

Then try to login from Intellij with the username and the newly created app password.

comments: author: John Sheng
body: Thank you for your help.

I use "johnsheng@bitbucket.org" as username

and app pwd as pwd.

I still get following error

C:\\\>git clone <https://johnsheng@bitbucket.org/wd-extend/extend-js-example.git>  
Cloning into 'extend-js-example'...  
fatal: Invalid credentials  
Password for '<https://johnsheng@bitbucket.org>':  
remote: Invalid credentials  
fatal: Authentication failed for '<https://bitbucket.org/wd-extend/extend-js-example.git/>'


author: Karthick S
body: Hello [@John Sheng](/t5/user/viewprofilepage/user-id/4789294)

As per the Bitbucket [communication](https://bitbucket.org/blog/deprecating-atlassian-account-password-for-bitbucket-api-and-git-activity#:~:text=Deprecating%20Atlassian%20account%20password%20for%20Bitbucket%20API%20and%20Git%20activity,-September%2003%2C%202021&text=Starting%20Sep%2013%2C%202021%2C%20new,to%20use%20Bitbucket%20app%20passwords.), Atlassian account passwords are deprecated for Bitbucket API calls and HTTPS git activity (clone, push, pull and fetch), and are being replaced by App Passwords.

App passwords are meant to substitute your real account password and are designed to be used for a specific purpose and limited permissions. They can be easily created and revoked when needed.

If you want to check more information about the App Password, you can reference this [documentation](https://bitbucket.org/account/settings/app-passwords/).

Please note, that the command expects the username, not the email ID. You can get the username from your [personal settings](https://bitbucket.org/account/settings/).   

I hope this helps.  

Regards,  
Karthick S


author: John Sheng
body: ![bitbucket2.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/187363i6879614CF2CA2FA1/image-size/large?v=v2&px=999 "bitbucket2.JPG")

comments: author: marcelnet
body: +1


Tags: atl-gruland

bitbucket-cloud

cloud