If Git keeps telling you that your credentials are invalid it is usually because a password or token from the past is lying around in a credential helper. An app password lets you avoid using your real account password and gives you fine grained scopes so a leaked secret does not ruin your day.
Sign in to Bitbucket, open personal settings and choose app passwords. Give the token a clear label so your future self does not rage quit in the terminal. For basic push and pull select repository read and write. If you work with pull requests add that permission. Less scope equals less blast radius if something escapes into a log or a public gist.
Cached credentials are the most common reason authentication fails. On Windows open Credential Manager and delete entries for bitbucket.org. On macOS open Keychain Access and remove matching items. On Linux check your credential helper and remove stored files or unset the helper.
git config --global --unset credential.helper
If you use a helper that stores files check the helper documentation or delete the helper files. After cleanup Git will prompt for fresh credentials on the next network operation.
Use your Bitbucket account username and paste the app password when prompted for a password. The username stays the same. If you let a credential helper save the new app password you will get fewer awkward prompts while debugging at 2 AM.
Create a dedicated Bitbucket app password, assign minimal scopes, clear stale local credentials and supply the new app password when Git asks. That simple sequence usually defeats authentication failures and keeps your main account password out of the danger zone.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.