Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


On This Page

Table of Contents

Authentication

The skysync-cli requires authentication information to be passed in with every command.  There are two ways to provide this information, in-line with the command or within a file.

parameter

description

required

default

server

The SkySync server URI

optional

http://localhost:9090/

username, user

The username 

optional

admin

password

The password

required

site

The remote site context

required when connecting to a remote site

Example 1: Command line parameters

In this example, the authentication parameters are provided via the command line with the request to list the connections.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

Code Block
skysync-cli --username={{username}} --password={{password}} --server=http://{{server IP address}}:{{server port}}/ connections list

Command with example values

Code Block
skysync-cli --username=admin --password=somePassword --server=http://111.111.111.111:9090/ connections list

Example 2: Parameters provided within a file

In this example, the authentication parameters are provided within the configuration file.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values. The skysync-cli.json must be in the working directory.

Command

Code Block
skysync-cli connections list

Contents of skysync-cli.json

Code Block
{
	"server": "http://{{server IP address}}:{{server port}}/",
	"username": "{{username}}",
	"password": "{{password}}"
}

Example 3: Parameters provided by environment variables

In this example, the authentication parameters are provided by environment variables.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command

Code Block
skysync-cli connections list

Environment Variable Name

Value

SKYSYNC_server

http://{{server IP address}}:{{server port}}/

SKYSYNC_username

{{username}}

SKYSYNC_password

{{password}}