svnserve.conf: Option expected的問題解決方法

逸卿發表於2014-04-17
經常有新手配置基於svnserve的subversion伺服器後,
在客戶端訪問subversion版本庫時出現這個錯誤:
svnserve.conf:12: Option expected
為什麼會出現這個錯誤呢,就是因為subversion讀取配置檔案svnserve.conf時,無法識別有前置空格的配置檔案,如
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository. (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
[general]
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
anon-access = read
auth-access = write
像上面的配置檔案中,anon-access是頂行的,沒問題,而auth-access就存在前置空格,會導致這個錯誤。
要避免出現這個錯誤,應該在去掉這些行前的#時,也要順手去掉前面的空格.

相關文章