Class DefaultReceivePackFactory

java.lang.Object
org.eclipse.jgit.http.server.resolver.DefaultReceivePackFactory
All Implemented Interfaces:
org.eclipse.jgit.transport.resolver.ReceivePackFactory<jakarta.servlet.http.HttpServletRequest>

public class DefaultReceivePackFactory extends Object implements org.eclipse.jgit.transport.resolver.ReceivePackFactory<jakarta.servlet.http.HttpServletRequest>
Create and configure ReceivePack service instance.

Writing by receive-pack is permitted if any of the following is true:

  • The container has authenticated the user and set HttpServletRequest.getRemoteUser() to the authenticated name.
  • The repository configuration file has http.receivepack explicitly set to true.
and explicitly rejected otherwise.
  • Field Summary

    Fields inherited from interface org.eclipse.jgit.transport.resolver.ReceivePackFactory

    DISABLED
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.jgit.transport.ReceivePack
    create(jakarta.servlet.http.HttpServletRequest req, org.eclipse.jgit.lib.Repository db)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultReceivePackFactory

      public DefaultReceivePackFactory()
  • Method Details

    • create

      public org.eclipse.jgit.transport.ReceivePack create(jakarta.servlet.http.HttpServletRequest req, org.eclipse.jgit.lib.Repository db) throws org.eclipse.jgit.transport.resolver.ServiceNotEnabledException, org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException
      Specified by:
      create in interface org.eclipse.jgit.transport.resolver.ReceivePackFactory<jakarta.servlet.http.HttpServletRequest>
      Throws:
      org.eclipse.jgit.transport.resolver.ServiceNotEnabledException
      org.eclipse.jgit.transport.resolver.ServiceNotAuthorizedException