Forums

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

Migrate Git from me/password to somename/API-Token

Chris Marti
June 8, 2026

I am repo Admin on MacOS with Git credentials in osxkeychain.

Bitbucket insists that I must move my CLion IDE from me@mymail + Password to SomeName + API-Token.

I insist that SomeName's API token is saved by Git in osxkeychain.

HOW TO do this WITHOUT trashing my web-GUI login (mail/password)?

Suggestions please, Chris

 

2 answers

1 accepted

1 vote
Answer accepted
Chris Marti
June 9, 2026

I found a route!

Bitbucket publishes a dummy user-name:
x-bitbucket-api-token-auth

Add a MacOS Passwords entry:
URL: bitbucket.org
User Name: x-bitbucket-api-token-auth
Password: ...nearly 200 chars of API-Token


Run the command:
git remote set-url origin https://x-bitbucket-api-token-auth@Bitbucket.org/wspace/repo/src/main

Where wspace = my workspace and repo = my respository

To check it worked, I ran the commands:
user@machine ~ % cd CLionProjects
user@machine CLionProjects % cd MyProject
user@machine MyProject % git ls-remote
Password for 'https://x-bitbucket-api-token-auth@bitbucket.org':

At that prompt, copy/paste API-Token from MacOS Passwords
The API-Token text did not display, just a small Passwords icon. Hit Return and:

From https://x-bitbucket-api-token-auth@bitbucket.org/wspace/repo/src/main
36cc-obfusticated-7ad3     HEAD
c475-obfusticated-9ff4      refs/heads/frozen0180
36cc-obfusticated-7ad3    refs/heads/main
a3ec-obfusticated-d7f4     refs/tag etc etc etc etc etc

NB frozen0180 exists only at the bitbucket repo. This is certainly a dump from remote.

Chris

0 votes
Ajay _view26_
Community Champion
June 8, 2026

Hi @Chris Marti 

Bitbucket is actively deprecating app passwords (the brownout schedule started today, June 9, 2026, with full removal on July 28). The newer replacement is Atlassian API tokens, which is what you should be setting up. If you were previously using an app password, move to an API token now to avoid disruption next month.

Chris Marti
June 9, 2026

Hi @Ajay _view26_ 

I know that and have a read/write API-Token ready to fly ...my question was how to persuade my local Git to use that Token instead of my e-mail/password without destroying my bitbucket web-GUI login which will continue to require the e-mail/password/2FA login after the transition?

The brutal route is to remove the e-mail/password from my Git credentials store (osxkeychain) to provoke a credentials prompt and later restore the e-mail/password login. Brutal != elegant.

Suggest an answer

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

Atlassian Community Events