Skip to contents

Write a netrc file that is valid for accessing DataSpace.

Usage

writeNetrc(
  login,
  password,
  netrcFile = NULL,
  onStaging = FALSE,
  overwrite = FALSE
)

Arguments

login

A character. Email address used for logging in on DataSpace.

password

A character. Password associated with the login.

netrcFile

A character. Credentials will be written into that file. If left NULL, netrc will be written into a temporary file.

onStaging

A logical. Whether to connect to the staging server instead of the production server.

overwrite

A logical. Whether to overwrite the existing netrc file.

Value

A character vector containing the netrc file path

Details

The database is accessed with the user's credentials. A netrc file storing login and password information is required. See here for instruction on how to register and set DataSpace credential. By default curl will look for the file in your home directory.

Examples

# First, create an account in the DataSpace App and read the terms of use
# Next, create a netrc file using writeNetrc()
writeNetrc(
  login = "dataspaceuser@email.com",
  password = "yourSecretPassword"
)
# Specify `netrcFile = getNetrcPath()` to write netrc in the default path