bitbucket.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 25 Apr 2024 22:33:14 +0300
changeset 2593 f0ab046a080f
parent 2525 cb9c3e5c2884
permissions -rw-r--r--
Installing Android SDK from command line tools.


===========
 Bitbucket
===========
.. contents::
   :local:

HTTPS access
============

As you cannot use your account password anymore:

https://bitbucket.org/blog/deprecating-atlassian-account-password-for-bitbucket-api-and-git-activity
  Deprecating Atlassian account password for Bitbucket API and Git activity.

you need to generate an app password in https://bitbucket.org/account/settings/app-passwords/

You can embed the password into URL::

  git clone https://$USER:$PASS@bitbucket.org/$USER/$REPO.git

As Git uses libcurl you can store password in the file ``.netrc``::

  machine bitbucket.org login USER password PAZZ

and avoid leaking it into shell history, ompare with the previous Git command::

  git clone https://$USER@bitbucket.org/$USER/$REPO.git

Two-step verification
=====================

Bitbucket recommends avoiding HTTPS and set up SSH key to access Git repositories:

https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/
  Configure SSH and two-step verification.