The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Update the OAuth Token user name

icornejo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2023

Hi;

I made a mistake when I initially signed onto bitbucket for work. The user name I signed up with was incorrect. I should have used my "work" username.

 

This is now causing some issues when I use bitbucket and sourcetree, because sometimes I use GIT using the command line, and it's using my "work" username, vs. the username in source tree.

 

I've tried adding a new authentication, but it won't let me type in a new username.

 

How do fix this issue?

 

Thanks!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Martin Runge
Community Champion
August 17, 2026

Hi @icornejo

Welcome to the Atlassian community!

This one is a bit old, so you may have already solved it. In case it helps: an OAuth account in Sourcetree does not let you set a username on purpose. It inherits whichever Atlassian account is signed in through your browser when you authorize.

So I would:

  • Remove the wrong account under Tools > Options > Authentication (Windows) or Sourcetree > Settings > Accounts (Mac).
  • Log out of the wrong Atlassian account in your browser first.
  • Add the account again, then authorize it with your work account.

Two things often missed: the old username can also sit inside the remote URL (https://olduser@bitbucket.org/...), which you fix in Repository Settings. And your command-line git keeps its own login in Windows Credential Manager or the macOS Keychain, so clear that entry too.

Cheers, Martin

 

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events