.. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. :orphan: .. _scm_hosting_ssh: *************** SCM Hosting-SSH *************** Configuring Git/SVN/Hg to use Allura auth via LDAP and ssh ========================================================== The following instructions will use a chroot, a custom FUSE driver, and LDAP. Once completed, an ssh-based configuration of Git, SVN, or Hg that has repos in the chroot directory will authenticate the users against LDAP and authorize via an Allura API. Allura will be configured to authenticate against LDAP as well. .. note:: The previous git & svn configuration instructions are not ssh-based, so will not work with this configuration. You'll have to reconfigure git & svn to use ssh:// instead of http or svn protocols. We assume you are using a version of Ubuntu with support for schroot and debootstrap. We will use a chroot jail to allow users to access their repositories via ssh. Install a chroot environment ---------------------------- These instructions are based on the documentation in `Debootstrap Chroot`_. and `OpenLDAPServer`_. Install debootstrap and schroot: :program:`apt-get install debootstrap schroot` Append the following text to the file :file:`/etc/schroot/schroot.conf` .. code-block:: ini [scm] description=Ubuntu Chroot for SCM Hosting type=directory directory=/var/chroots/scm script-config=scm/config Create a directory :file:`/etc/schroot/scm` and populate it with some files: .. code-block:: console # mkdir /etc/schroot/scm # cat > /etc/schroot/scm/config < /etc/schroot/scm/fstab < /etc/schroot/scm/copyfiles < /etc/schroot/scm/nssdatabases <