Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-23180

Pushing an LFS object using Pipelines default authentication method does not work

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Repository - LFS
    • None

      Issue Summary

      Pushing an LFS object using Pipelines default authentication method does not work

      Steps to Reproduce

      1. Create a repository and enable Pipelines on it
      2. Install LFS and add one file to be tracked as LFS objects. The following yml file is a sample
      image: atlassian/default-image:4
      
      clone:   lfs: true
        
      pipelines:   
          default:     
              - step: 
                      name: Default
                      script: 
                      - echo "Hello World" >> out1.json          
                      - apt-get update
                      - apt-get upgrade -y
                      - apt-get install -y git-lfs
                      - git add . && git commit -m "[skip ci] LFS JSON Push"
                      - git push
      

      3. In the above example, json files are tracked as LFS. Hence, the push contains an LFS object in the commit.

      Expected Results

      The push is completed

      Actual Results

      The Pipeline fails with this error -

      git push
      
      fatal: could not read Username for 'https://bitbucket.org': No such device or address
      
      fatal: could not read Username for 'https://bitbucket.org': No such device or address
      
      fatal: could not read Username for 'https://bitbucket.org': No such device or address
      
      Git credentials for https://bitbucket.org/%7B%7D/%7B<repo_UUID>%7D/info/lfs/object/verify?upload_id=<upload-ID> not found.
      
      error: failed to push some refs to 'http://bitbucket.org/<workspace-ID>/<repo-slug>'
      

       

      It looks like the workspace field is empty and only contains encoded brackets - %7B%7D

      Workaround

      You can push using other mechanisms such as SSH or App Password. Here is a push command using App Password that has repo read permissions -

      git push https://$username:$app_password@bitbucket.org/<workspace-id>/<repo-ID>.git
      

       

            [BCLOUD-23180] Pushing an LFS object using Pipelines default authentication method does not work

            Hi, this bug should have Medium priority as per Atlassian Bug Fix Policy, thanks

            andrea.lincetto added a comment - Hi, this bug should have Medium priority as per Atlassian Bug Fix Policy, thanks

              Unassigned Unassigned
              9cc073eb116c Aravind Anil
              Affected customers:
              2 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated: