just wondering what the difference is between the 2 solutions and why the old solution (which itself was the replacement for an earlier solution) was being discontinued.
the atlassian alert addressed the "when" but not the "where", "why", "how" etc
API tokens provide more granular control over the access that is granted (scoped on a per-product basis with a larger breakdown of areas to grant access in that product). They align with our other products, which use API tokens rather than App Passwords for authentication. They can also be expired, whereas our App Password implementation could not (which allows for greater control over rotation requirements).
Please let me know if you require further information.
Cheers!
- Ben (Bitbucket Cloud Support)
Ben:
Hello. I have been completely flummoxed by this move from app passwords to API tokens. It seems I am not alone in that.
I 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.
I have an API token with what I believe are the right permissions. But how do I use it? How do I switch that to use API tokens? Could you please share the sequence of commands to:
forget my current credentials (my app password)
store my token-based credentials
pull and push
Thank you very much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @ryancw
To start using API tokens with Bitbucket Cloud - you'll need to make sure that when you create the API token that you specify the correct scope - this is mentioned in our deprecation documentation:
Click the gear cog icon, select Atlassian Account settings > Security tab > Create and manage API Tokens
Click Create API token with scopes and select Bitbucket Cloud
If you want to be able to clone/push/pull to the repository - you'll need to tick both read:repository:bitbucket and write:repository:bitbucket - clone only would just be read:repository:bitbucket. More information on scopes can be found in our API scopes documentation.
// Username
git remote set-url origin https://username:APIToken@bitbucket.org/workspaceID/reposlug.git
// Token alias
git clone https://x-bitbucket-api-token-auth:APIToken@bitbucket.org/workspaceID/reposlug.git
NOTE: you'll need to replace the placeholder values above with actual values (username/APIToken/workspaceID/reposlug)
Let me know if any issues.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.