github.com/slspeek/camlistore_namedsearch@v0.0.0-20140519202248-ed6f70f7721a/website/content/docs/client-config (about)

     1  <h1>Configuring a client</h1>
     2  
     3  <p>The various clients (camput, camget, cammount...) use a common JSON config file. This page documents the configuration parameters in that file. Run <code>camtool env clientconfig</code> to see the default location for that file (<b>$HOME/.config/camlistore/client-config.json</b> on linux). In the following let <b>$CONFIGDIR</b> be the location returned by <code>camtool env configdir</code>.</p>
     4  
     5  <h2>Generating a default config file</h2>
     6  
     7  <p>
     8  Run <code>camput init</code>.
     9  </p>
    10  <p>
    11  On unix,
    12  <pre>
    13  cat $CONFIGDIR/client-config.json
    14  </pre>
    15  should look something like:
    16  
    17  <pre>
    18  {
    19  	"identity": "43AD73B1",
    20  	"ignoredFiles": [
    21  		".DS_Store"
    22  	],
    23  	"servers": {
    24  		"localhost": {
    25  			"auth": "localhost",
    26  			"default": true,
    27  			"server": "http://localhost:3179"
    28  		}
    29  	}
    30  }
    31  </pre>
    32  </p>
    33  
    34  <h2>Configuration Keys &amp; Values</h2>
    35  
    36  <h3>Top-level keys</h3>
    37  
    38  <ul>
    39  <li><b><code>identity</code></b>: your GPG fingerprint. Run <code>camput init</code> for help on how to generate a new keypair.</li>
    40  
    41  <li><b><code>identitySecretRing</code></b>: Optional. If non-empty, it specifies the location of your GPG secret keyring. Defaults to <b>$CONFIGDIR/identity-secring.gpg</b>. Run <code>camput init</code> for help on how to generate a new keypair.</li>
    42  
    43  <li><b><code>ignoredFiles</code></b>: Optional. The list of of files that camput should ignore and not try to upload.</li>
    44  </ul>
    45  
    46  <h3>Servers</h3>
    47  
    48  <b><code>servers</code></b>: Each server the client connects to may have its own configuration section under an alias name as the key. The <b><code>servers</code></b> key is the collection of server configurations. For example:
    49  
    50  <pre>
    51  	"servers": {
    52  		"localhost": {
    53  			"server": "http://localhost:3179",
    54  			"default": true,
    55  			"auth": "userpass:foo:bar"
    56  		},
    57  		"backup": {
    58  			"server": "https://some.remote.com",
    59  			"auth": "userpass:pony:magic",
    60  			"trustedCerts": ["ffc7730f4b"]
    61  		}
    62  	}
    63  </pre>
    64  
    65  <ul>
    66  <li><b><code>trustedCerts</code></b>: Optional. This is the list of TLS server certificate fingerprints that the client will trust when using HTTPS. It is required when the server is using a self-signed certificate (as Camlistore generates by default) instead of a Root Certificate Authority-signed cert (sometimes known as a "commercial SSL cert"). The format of each item is the first 20 hex digits of the SHA-256 digest of the cert. Example: <code>"trustedCerts": ["ffc7730f4bf00ba4bad0"]</code></li>
    67  
    68  <li><b><code>auth</code></b>: the authentication mechanism to use. Only supported for now is HTTP basic authentication, of the form: <code>userpass:alice:secret</code>. Username "alice", password "secret".</br>
    69  If the server is not on the same host, it is highly recommended to use TLS or another form of secure connection to the server.
    70  </li>
    71  
    72  <li><b><code>server</code></b>: The camlistored server to connect to, of the form: "[http[s]://]host[:port][/prefix]". Defaults to https. This option can be overriden with the "-server" command-line flag.</li>
    73  
    74  </ul>