I just created an API Token for BitBucket in order to use it for Push/Pulls from my repository.
I followed the steps in the following question to create a token with scopes defined.
https://community.atlassian.com/forums/Bitbucket-questions/Git-Access-with-API-Token/qaq-p/3057268
And I selected the following scopes:
My .git/config file has my remote origin url appropriately defined as:
https://{bitbucket_username}@bitbucket.org/{workspace}/{repository}.git
However, when I do a 'git pull' and when prompted, enter the API Token password, it says that Authentication failed.
Am I missing something?
Thanks in advance!
Hi @Mundo
Welcome to the community!
As a start, are you able to clone the repository using the API token? You can try using this format when cloning
git clone https://<username>:<APIToken>@bitbucket.org/workspaceID/reposlug.git
This is to test and see if your token scopes are sufficient for cloning, as it also applies to pull or push.
Let me know how it goes.
Regards,
Syahrul
Hello @Syahrul
Thank you for your response!
I just tried again this morning after updating my .git/config file to have my remote origin url to include my new APIToken in the url itself, and this worked!
It wasn't working a couple of days ago, so I think it must've just taken a little time to activate (or something :-) ).
One follow-up question for you if you don't mind...should it work for me to provide the APIToken as a password when prompted?
If, for example, I performed the following request (without the APIToken in the URL):
git clone https://<username>@bitbucket.org/workspaceID/reposlug.git
Because this still doesn't work for me. But perhaps that's as designed?
Thanks!
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.