Hello. I have been completely flummoxed by this move from app passwords to API tokens. It seems I am not alone in that.
have been using only a tiny subset of git capabilities in my single-user workflow, but it's enough for me. So I"m a long-time but still inexperienced user.
I use git via command line on Linux Mint. I have my credentials stored. (Yes, I know, but I am the only person with physical access to my computers.) So to push and pull (really my only actions) I simply do::
git pull
or
git push
when in my project directory.
How do I switch that to use API tokens? Could someone please share the sequence of commands to:
forget my current credentials
store my token-based credentials
pull and push
Thank you very much.
Hello @ryancw
Your credential.helper store will cache the new token automatically. Ensure it has both read:repository:bitbucket and write:repository:bitbucket scopes, then clear the old credentials by running:
printf "protocol=https\nhost=bitbucket.org\n\n" | git credential reject
Next, run git pull, enter your case-sensitive username, and paste the token as the password to save it. If that fails, you can force Atlassian's token auth by running git remote set-url origin https://x-bitbucket-api-token-auth@bitbucket.org/<workspace>/<repository>.git and pulling again, just don't put the actual token string in the URL.
Best,
Arek 🤠
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.