Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to use a Repositories HTTP Access token to Clone it

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.

bitbucketshit.png

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.

2 answers

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

0 votes
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 21, 2022

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

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.

Hi Christian,

Any update? I have the same problem.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events