I'm very confused about Bitbucket Repository HTTP Access Tokens (and your bitbucket docs seem to be very confused as well).
I found out that the feature is coming from a "plugin?": The URL of it in the settings is https://bitbucket.company.com/plugins/servlet/access-tokens/admin but i didn't find a plugin installed on our side that fits to the name so i assume it's a built-in one.
When i'm in the repo settings, i have a menu to create access tokens and a text that explain that i can clone the repo and interact with the rest api with this token.
I found out that the token is in fact a Bearer Token with which i can login with the website (dunno about api because the rest api is quite terrible and never really works for us).
What bothers me is the description of the Access Tokens which imply the possibility of using it with git clone.
And when i klick the link it shows a "Page not found page". And when i search in the docs for HTTP Access Token, i only get docs for Personal Access Tokens which are different.
Can someone clarify what's going on here? Can i use the token to clone the repo with basic auth? If yes, what's the username? Why are the docs so confusing? I'm lost here.
Hi Christian,
We have the same problem here.
I created a HTTP access tokens inside a repository.
I tried to :
git clone https://token_name:token@bitbucket....com/scm/xxx/test.git
And I get an fatal: Authentication failed
Do we miss something on how to use it ?
We're running on Bitbucket 7.21.4
And btw, the link Learn more about HTTP access tokens on top of the section targeting BITBUCKETSERVER0721 doesn't work.
Thx for your help
Regards
Yann
It's not clear from the relevant documentation but it's mentioned there.
You have to use the following syntax:
git clone -c http.extraHeader='Authorization: Bearer MDM0MjM5NDc2MDxxxxxxxxxxxxxxxxxxxxx' {your-repo}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tim,
When it comes to git operations the token replaces the password. The username should be the user whom the token belongs to. For REST API operations you can specify the token in the Authorization header.
Cheers,
Christian
Premier Support Engineer
Atlassian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand, but this isn't a personal access token. It's a HTTP Access Token i create in the Repository Settings.
I cannot use this access token with my own username to clone the repository. I'm getting an expected fatal: Authentication failed for Repoxyz error if i try this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Any update? I have the same problem.
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.