Created an API token "with scopes" here https://id.atlassian.com/manage-profile/security/api-tokens including all 42 Bitbucket permissions.
Set the token like this:
git remote set-url origin https://{bitbucket_username}:{api_token}@bitbucket.org/{workspace}/{repository}.git
Now when I push I get:
You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated
Please advise. I have tried repeating the steps and looking through the docs, and looking at responses to other people who have had issues with this and cannot find a solution.
Also Avoid embedding the token directly in the remote URL. Use Bitbucket's static token username so Git prompts you for the password securely:
git remote set-url origin https://x-bitbucket-api-token-auth@bitbucket.org/{workspace}/{repository}.git
git push
When prompted for the password, paste your API token.
Try that and let know how it goes.
Best,
Arkadiusz🤠
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was getting the same error as kernoweb when embedding the token, so I tried your suggestion of using Bitbucket's static token username. I was prompted for the password, but after entering the API token, I still received the same error.
remote: You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated.
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.