Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,678
Community Members
 
Community Events
176
Community Groups

How to set app password in Git Bash (command prompt)

Hello!

Can anybody suggest - how to set Bitbucket app paaword into Git Bash client? I tried to set it just like "git config --global user.password=""" but it doesn't work. The warning from bitbucket is showing after every push.

In official documentation there is instructions only for SourceTree. Nothing about git Bash.

Thanks.

2 answers

Hi I tried several attempts / ways via git bash on windows 11, 

reinstalled git bash, deleted / changed configs etc... none of these worked

I created the app password on Bitbucket as per indicated steps 

and went to Control Panel -> Credential Helper,

edit on git:https://bitbucket.org and set the app password, 

after done this I committed and pushed a new change and did not receive anymore the warning 

remote: You are using an account password for Git over HTTPS.
remote: Beginning March 1, 2022, users are required to use app passwords
remote: for Git over HTTPS.

 

Hope it helps

This is great hear that you solved it. I have also tried many things, dozens.  Can you explain in detail what you mean by:

1 - went to control panel -> credential helper,

2 - edit on git:https://bitbucket.org and set the app password

Thanks!!!

Like Calel Andrei V_ Valdez likes this

also in git .config did you set credential manager to wincred?

Norbert C Atlassian Team Mar 27, 2022

Hi @Bec Wilson 

Please do the following steps:

- Click on Start button -> Type "Credential Manager"

- Once you opened the Credential Manager, click on Windows Credentials -> Search for git:https://bitbucket.org, click on the arrow -> Edit

Please let me know how it goes.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Like # people like this

@Bec Wilson sorry for late response,

I did same as from Norbert

 

first added new app password from Atlassian by using this guideline

https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/#Create-an-app-password

 

then once created I used as from Norbert steps,

sorry it was Credential Manager and not helper

Norbert's steps worked perfectly! Thanks so much!!

Like Norbert C likes this
Norbert C Atlassian Team Jun 16, 2022

You're welcome @Leticia I'm glad to hear I was able to help :)

0 votes
Norbert C Atlassian Team Feb 08, 2022

Hi @zaktan ,

Thank you for contacting Atlassian Community, I'm Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you.

To save the credentials in your computer, I can recommend you to do these steps:

First run:

git config --global credential.helper store

After you ran this command, please clone a repository by doing:

git clone https://yourusername@bitbucket.org/workspace/repository 

When you clone the repository, please provide your password, once you provided the password a ~/.git-credentials file should be present in your home directory. Please keep in mind, that this file is in plaintext on your PC's disk, everyone on your computer can access it.

Please let me know how it goes, I'm here to help.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Hi!

Is there a way without cloning repository? My repo is big and heavy and I don't need to download it, I already have it on my PC.

Also I've tried to make .git-credentials file myself with content format:

https://apppw_name:apppw_password@bitbucket.org/workspace/repository

but nothing works. Need help.

P.S. and also when started to clone repository - no passwords was asked.

Norbert C Atlassian Team Feb 11, 2022

Hi @zaktan 

I'd like to inform you that the .git-credential file is stored in your home directory (C:\Users\username\.git-credential and the format is the following for the .git-credential file:

https://username:password@bitbucket.org

 Also I'd like to inform you that instead of "git clone", you can also run the "git pull" command.

Before running the "git pull" command, can I ask you to access the "Credential Manager" in your Windows system and try to delete all the Git related credentials?

Please let me know how it goes.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

Hi @Norbert C 
I'm the only one person who pushes commits to this repository. And because of this I have nothing to pull from it.

In my windows home directory I had the .git-credentials file, where was my bitbucket account username and password. I changed username to AppPassword Label and password to AppPassword itself. Is it right?

I suppose it isn't, cuz the warning in command line after push was showed again after this change.

Norbert C Atlassian Team Feb 14, 2022

Hi @zaktan 

It's interesting.

Can I suggest you the following and let me know whether if it's working for you?

Please try to re-install your Windows Git client and once you have the following option, enable the "Git Credential Manager"

gitcredentialmanager.png

This way your credentials are stored safely in your the "Credential Manager" in your Windows environment.

Once you have this feature enabled, when you do a git push a window like this should pop up and here please provide your password, once you provide the password here, it should save the password in your Windows' Credential Manager

asdf.png

Please let me know how it goes.

Best Regards,
Norbert
Atlassian Bitbucket Cloud Support

@zaktan you don't really have to reclone the repo. It appears that after providing the app password in the prompt following the git clone command, git would generate the proper content under the .git-credentials file; In my case, it was enough so as to make my existing clones operable as well.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events