Registering Crane Repositories

Crane

The craneR package allows to you both upload and download artifacts from a Crane repository.

Crane is a repository webserver with advanced authentication and authorization (using OpenID Connect) for hosting data science artifacts, documentation, …

Registering

The first step is to tell craneR about your Crane repository and identity provider. You can do so with the register function. You will only need to this once per repository.

You will need the following:

The particulars will depend on the identity provider, the next sections will show examples for a few identity providers CraneR has been tested with.

Repository configuration is kept in a configuration file. The default location for this file is based on the XDG specification (see ?default_config_file). You can change this by setting the R option crane.repo.config or the environment variable CRANE_REPO_CONFIG.

Azure Entra ID

You will need:

craneR::register(
  repo,
  client_id = "<client id>",
  device_code_url = "https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/devicecode",
  token_url = "https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/token",
  scope = "<client_id>/.default"
)