Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »



On This Page


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

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

Command with example values

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

skysync-cli connections list

Contents of skysync-cli.json

{
	"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

skysync-cli connections list

Environment Variable Name

Value

SKYSYNC_server

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

SKYSYNC_username

{{username}}

SKYSYNC_password

{{password}}




  • No labels