Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manipulate Bitbucket repository with token?

Tags:

I followed this documentation to get a token value and a token secret from bitbucket:
https://confluence.atlassian.com/display/BITBUCKET/OAuth+on+Bitbucket

After that I want to push/pull to a given repo by using that token.

At Github I can use the token like this way: https://help.github.com/articles/git-automation-with-oauth-tokens#step-2-clone-a-repository

My question is how can I use this kind of http authorization at bitbucket (mercurial/git)?

like image 707
Gábor Domonkos Avatar asked Jul 25 '14 22:07

Gábor Domonkos


People also ask

How do I use tokens in Bitbucket?

To generate a personal access token from within Bitbucket Server go to Manage account > Account settings > Personal access tokens. Admins cannot create tokens for users. Admins can change and revoke tokens from the users personal tokens page. Use permissions to get the correct access for different users.

How do I add a personal access token to repository?

Under your GitHub user profile (not the repository profile), click the “Settings” link. Scroll down and click the “Developer Settings” link. Click the GitHub “Personal access tokens” link. Click the “Generate new token” link and provide your password again if required.

How do I use a personal access token?

From your home page, open user settings , and then select Personal access tokens. Select + New Token. Name your token, select the organization where you want to use the token, and then set your token to automatically expire after a set number of days.

How do I create a token in Bitbucket cloud?

To create an HTTP access token for a project or repository (requires project or repository admin permissions): From either the Project or Repository settings, select HTTP access tokens. Select Create token. Set the token name, permissions, and expiry.


1 Answers

I used an App password which I created from the Bitbucket Cpanel under Settings -> Access management (sidebar) -> App Passwords. After I did this I cloned the repo by using my username and the new app password as follows:

https://[your_user_name]:[app_password]@bitbucket.org/[your_user_name]/[repo_name].git 
like image 135
Psymatix Avatar answered Nov 11 '22 04:11

Psymatix