This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

django-anyvcs is a Django app providing homogenous management of multiple version control systems, and the access rights to them. Currently supported VCS systems are git, Mercurial, and Subversion.

Each instance of django_anyvcs.models.Repo corresponds to a VCS repository on the server’s disk. You can grant access on these repos to one or more Django User or Group (from django.contrib.auth.models).

All repositories can be made available through the SSH access method. The SSH server should be configured with user public keys which force a specific command to be run, instead of the command that was requested - this command should be django-anyvcs-ssh, which is generated by setuptools when this package is installed. You’ll probably want to use django-sshkey to help you do this. The original ssh_dispatch.py script is still included with a deprecation warning for backwards compatibility.

The django-anyvcs-ssh program interprets the original ssh command, which should be in the SSH_ORIGINAL_COMMAND environment variable (automatically set by OpenSSH), and fulfills the request, granting and denying access as configured in Django.

Configuration

Add django_anyvcs to your project’s INSTALLED_APPS.

The django_anyvcs.views.access view is used by django-anyvcs-ssh. The URL that maps to this view should be accessible to the host running django-anyvcs-ssh (usually localhost).

The django_anyvcs.views.api_call view is not used by any component of django-anyvcs, but is made available to provide a web API to access the underlying repository. The django_anyvcs.remote module provides a python API to this web API which provides an interface similar to anyvcs.common.VCSRepo objects.

Warning

Do not make any URLs from django_anyvcs.urls available to the public, as they can reveal sensitive information.

Settings

django-anyvcs looks at the following variables in your project’s settings.py:

VCSREPO_ROOT
String, required. The root directory in which all VCS repositories are stored.
VCSREPO_PATH_FUNCTION
Function, optional. Override the default path given to a repo. The function is given a repo and returns a string (the path).
VCSREPO_CHECK_NESTED_PATHS
Boolean, defaults to True. If true then repo paths are checked against all other repo paths to make sure they aren’t nested inside each other. This is a fairly expensive operation, so if you know this won’t ever happen then set this to False.
VCSREPO_ALLOW_NESTED_PATHS
Boolean, defaults to False. If true then VCS systems that support it will allow path nesting. Currently, only Mercurial supports this.
VCSREPO_USE_USER_RIGHTS
Boolean, defaults to True. If true then the UserRights model will be enabled.
VCSREPO_USE_GROUP_RIGHTS
Boolean, defaults to True. If true then the GroupRights model will be enabled.
VCSREPO_USER_MODEL
String, defaults to AUTH_USER_MODEL or 'auth.User'. Defines the user model that UserRights is tied to.
VCSREPO_GROUP_MODEL
String, defaults to 'auth.Group'. Defines the group model that GroupRights is tied to.
VCSREPO_RIGHTS_FUNCTION
Function, optional. If set, this function is called with two parameters: the repository being accessed, and the user who is accessing the repository (may be None to indicate an anonymous user). The function should return the rights string, which is one of ‘-‘ (deny access), ‘r’ (read-only access), or ‘rw’ (read and write access).
VCSREPO_USER_ACL_FUNCTION
Function, optional. If set, this function is called with one parameter which is a repository. The function should return a dict which maps auth.User instances to a rights string, one of ‘-‘, ‘r’, or ‘rw’ for the given repository.
VCSREPO_GROUP_ACL_FUNCTION
Function, optional. If set, this function is called with one parameter which is a repository. The function should return a dict which maps auth.Group instances to a rights string, one of ‘-‘, ‘r’, or ‘rw’ for the given repository.
VCSREPO_RECALCULATE_DISK_SIZE
Boolean, optional. If true, django-anyvcs will automatically recalculate disk size of repositories whenever django-anyvcs-ssh is invoked to access them. Defaults to true.
VCSREPO_IGNORE_PRIVATE
Boolean, optional. If true, django-anyvcs will not consider cached information generated by python-anyvcs a part of the disk size. Defaults to true.

When used with django-sshkey, a setting similar to this will tie together the two apps:

SSHKEY_AUTHORIZED_KEYS_OPTIONS = \
  'command="env VCSREPO_ROOT=%s /path/to/django-anyvcs-ssh ' \
  'http://localhost:8000/anyvcs/access {username}",no-agent-forwarding,' \
  'no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding' % VCSREPO_ROOT

Dependencies

Although not a strict dependency, django-anyvcs was designed to be used in conjunction with django-sshkey (version 2.0.0 or greater) and would be fairly useless without it or something that provides a similar functionality.

Release History

Release History

2.5.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.4.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.3.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.3.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.3.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

2.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-anyvcs-2.5.0.tar.gz (30.8 kB) Copy SHA256 Checksum SHA256 Source Jun 16, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting