We are getting an authentication failure when trying to clone a Bitbucket repo with LFS enabled using an access key, which we think might be related to having 2-factor authentication.
With GIT_TRACE=1 git clone resulted in this:
trace git-lfs: tq: sending batch of size 1
trace git-lfs: ssh cache: XXXX@bitbucket.org git-lfs-authenticate XXXX/XXXX.git download
trace git-lfs: api: batch 1 files
trace git-lfs: HTTP: POST https://bitbucket.org/XXXX/XXXX/info/lfs/objects/batch
trace git-lfs: HTTP: 403
trace git-lfs: HTTP: {"type": "error", "error": {"message": "To access this repository, enable two-step verification."}}
trace git-lfs: api error: Authorization error: https://bitbucket.org/XXXX/XXXX/info/lfs/objects/batch
Check that you have proper access to the repository
Our admin temporarily disabled 2FA and the clone was successful.
A clone with an account level SSH key is also successful.
Unfortunately we have constraints that mean we need both 2FA and to use a repo Access Key.
Is this expected behaviour or a bug?