Configuring connections via CLI (macOS)

You'll need to restart OffShoot to apply any changes made with these commands.

Connections are stored in these keys:

  • S3AwsConnections

  • S3GenericConnections

A connection is structured using the following JSON format:

[
  {
    "path" : "",
    "label" : "",
    "endpoint" : "https://s3.eu-central-1.amazonaws.com",
    "bucket_name" : "bucket-name",
    "accessKey" : "ACCESSKEY"
  }
]

Creating a connection

You can create an AWS S3 connection from a JSON file using the structure listed above with the following Terminal command:

defaults write nl.syncfactory.Hedge.Mac S3AwsConnections -string "$(cat /path/to/file.json)"

The connection's Secret Access Key is stored in the login Keychain as an Application password item, which you can create with the following command:

sudo security add-generic-password -a "ACCESSKEY" -s "https://s3.eu-central-1.amazonaws.com/bucket-name" -l "https://s3.eu-central-1.amazonaws.com" -w "secret-access-key" -T "/Applications/OffShoot.app"

Although OffShoot was allowed access when creating the keychain item, permissions must be allowed again. Please let us know if you discover how to fix this issue.

Checking existing AWS S3 locations

defaults read nl.syncfactory.Hedge.Mac S3AwsConnections

Write current S3 connections to a JSON file

(For backing up or editing the JSON file.)

defaults read nl.syncfactory.Hedge.Mac S3AwsConnections > `/path/to/jsonname.json`

Last updated