Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19297

Jgit throws an exception on client side when performing an initial push over SSH on new repository

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • High
    • None
    • 8.0.0, 8.19.0
    • Git Hosting, Mesh

    Description

      Issue Summary

      Jgit throws an exception on client side when performing a initial push over SSH on new repository. The problem is with the new codepath in Bitbucket 8.x and later while pushing the code with JGIT client only.
      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Create Repository with Rest API on Bitbucket 8.x
      2. Push content to repository over SSH with jgit client

      Expected Results

      Repository pushed to remote without any exception.

      Actual Results

      JGIT client throws an exception java.io.EOFException: Short read of block on client side

      Workaround

      Workaround #1

      When pushing with jgit to Bitbucket use the --atomic flag with your command

      And/or if you have not disabled Bitbucket Mesh and do not want to use the --atomic flag for every push you can add the following hosting.atomic-initial-push=false to the mesh.properties file located in BITBUCKET_HOME_DIR/mesh

      Workaround #2

      Please note, this workaround shouldn't be used if:

      1. Bitbucket version is 8.18.x or above
      2. Repositories are migrated to Bitbucket Mesh.

      Disable the mesh by adding below property to bitbucket.properties to bypass the new codepath. 

      mesh.enabled=false
      

      Please make sure to restart the Bitbucket service for the above change to take effect.

      Workaround #3

      Use HTTPS when pushing to Bitbucket 
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              de843d56add4 Kalyan Kumar
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: