zoom1 zoom2 zoom3

philippewang.info

# ====================-=====-====================
# ==================== HOWTO ====================
# ====================-=====-====================
#          >>>      SVN VIA SSH     <<<
# ====================-=====-====================
#  MULTI VIRTUAL USERS BUT A SINGLE REAL ACCOUNT
# ====================-=====-====================
# * this technique requires the use of ssh keys *
# ====================-=====-====================

# Create a repository

       svnadmin create "${PATH_TO_REPOSITORY}"

# Add a *virtual* user
  # A virtual user is a user that has no real account,
  # but only a svn account.

       echo "command=\"svnserve -t --tunnel-user=${USERNAME}\",\
             no-port-forwarding,no-agent-forwarding,no-X11-forwarding,\
             no-pty ${KEYTYPE} ${KEY} ${COMMENT}" \
           >> "${HOME}"/.ssh/authorized_keys

  # The virtual user shall not be allowed to access to anything
  # else on the real account. 

       
# Checkout

       svn co svn+ssh://${HOST}${ABSOLUTE_PATH_TO_REPOSITORY}

           # (there must *not* be any extra slashes)

# Commit
  # in the local checked out repository, do
      svn ci -m "your message about changes"

# Update
  # in the local checked out repository, do
      svn up


# ====================-=====-====================
# ============ ! SET THE VARIABLES ! ============
# ====================-=====-====================

${USERNAME} : the username of the *virtual* user 
  # (it should be different from the login of the real account...)

${PATH_TO_REPOSITORY} : absolute or relative path to repository
  # (don't put spaces into paths, unless you want to play with them)

${ABSOLUTE_PATH_TO_REPOSITORY} : absolute path to repository


${HOST} : login@host or host if login is implicit


${KEYTYPE} : the ssh key type, for example : ssh-rsa

${KEY} : the ssh key

${COMMENT} : a comment

A ${KEYTYPE} ${KEY} ${COMMENT} example : 

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwIjFkM7D\
FRum9tcs1nzoMN6rUPdFeOP6ibolwb5UTirMHMMo8qzx\
jn5WdIwVzyxYRz4dDXCHcjje7Fsx4gp5mGBHpGDT9Pbn\
3E7+L4yD4llglwYj0P6nSm1PAx1C34ZU500Z0w0ebAMG\
HgNs69Tcz4zFNky2S0cZrqqMP+icOyX1bi+aA9TXE+tw\
qORu6WbEid8xoWsngo+YNFdyLDZnOMsAxJJF93R21kSZ\
hJ905rN/4kyIM6T27eABRnfBfM6dUJFclmRRoB2isydR\
L1B6dppvUY+Vuq0928hKipNZqfHz+V3v/DC8W4p+aKJm\
9guyBgKvs/9LYhlFmMIWU94Gzw== plop@host



:: philippewang.info ::

:: design & photos by Philippe Wang :: XHTML 1.1 :: CSS 2 :: RSS 2 :: stats :: contact ::
:: Best viewed with Safari or Opera or Firefox or Links :: No SPAM Please ::
 
This page was generated on Mon Jan 26 23:04:11 CET 2009 by BashGXD