Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

single-user command-line user of git on Linux; how to swtich to using these infernal API tokens?

ryancw
July 19, 2026

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.

3 answers

1 vote
ccenvcvb
Contributor
July 22, 2026

Why don't you use an ssh key ? 

steps

ssh-keygen
add generated pub key to your bitbucket account https://bitbucket.org/account/settings/ssh-keys/

use git@ urls instead of http urls for git clone

change existing remote urls with git remote command

see also, but I don't see the need for the ssh agent mentioned there
https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-linux/

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 20, 2026

Hi @ryancw 

I've responded to your comment on another post - you may view it at the link below :) 

Cheers!

- Ben (Bitbucket Cloud Support)

0 votes
Arkadiusz Wroblewski
Community Champion
July 19, 2026

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 🤠

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events