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)?
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With