Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-11047

Git LFS 2.5.0+ Change in expected lfs.contenttype breaks pushes

    XMLWordPrintable

Details

    Description

      Summary

      Git-LFS has made an API breaking change to content type handling in 2.5.0+. When upgrading Git LFS to 2.5.0+, you are no longer able to push due to an unexpected content type.

      Environment

      Client running Git LFS 2.5.0 or 2.5.1

      Steps to Reproduce

      Upgrade LFS to affected version and attempt pushing an LFS file.

      Expected Results

      Successful push

      Actual Results

      Bitbucket Log Error:

      2018-08-08 18:11:37,265 ERROR [http-nio-7990-exec-7] paul @15CGODGx1091x321x1 i5r88x 10.0.2.107,10.0.2.14 "PUT /rest/git-lfs/storage/RIV/main/6f1986c018c8cc96864089f1204018c90252db157a8d89054b126456cdeec5af HTTP/1.1" c.a.b.i.s.g.l.http.HttpScmErrorUtils Un-mapped exception
      javax.ws.rs.WebApplicationException: null
      	at com.sun.jersey.server.impl.uri.rules.TerminatingRule.accept(TerminatingRule.java:66)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:92)
      	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39)
      	at com.atlassian.bitbucket.internal.xcode.web.XcodeUserAgentFilter.doFilter(XcodeUserAgentFilter.java:36)
      

      Git LFS debug output:

      HTTP/1.1 500
      Content-Type: application/vnd.git-lfs+json
      
      11:49:58.987733 trace git-lfs: HTTP: {"message":"null"}
      {"message":"null"}11:49:58.987986 trace git-lfs: tq: refusing to retry "6f1986c018c8cc96864089f1204018c90252db157a8d89054b126456cdeec5af", too many retries (8)
      Uploading LFS objects:   0% (0/1), 0 B | 0 B/s                                  
      Fatal error: null
      Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done
      error: failed to push some refs to 'git@<bitbucketURL>/proj/repo.git'
      11:49:58.991543 pkt-line.c:80           packet:         push> 0000

      Workarounds

      Implement one of the following options as a workaround:
      1. (preferred) Install the hotfix plugin as described in this comment
      2. Change local git config flag on every git client

      $ git config lfs.contenttype false

      3. Roll git lfs version back to 2.4.2 on every git client

      Attachments

        Issue Links

          Activity

            People

              dkjellin Daniel
              miwalker Michael Walker
              Votes:
              4 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: