Skip to content

Fix LFS objects not downloading with Bitbucket

Stan Hu requested to merge sh-fix-lfs-download-bitbucket into master

Previously attempting to download LFS files with Bitbucket via a project import would result in a 401 error. This happened because Bitbucket returns a header payload that should be included in the HTTP GET request. As described in https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#successful-responses, we need to include this with the request for the download to succeed.

Testing

  1. Import https://bitbucket.org/GitKrakenQA/bitbucket-lfs.git.
  2. Navigate to demo-imgs directory.
  3. Notice the LFS tag next to the file.
  4. git clone the project to be sure.

Relates to #335123 (closed)

Edited by Stan Hu

Merge request reports

Loading