Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

create-artifactory-access-config

instana18.8kMIT1.3.0

Adds proper access configuration to your global .yarnrc.yml config file for usage of Artifactory.

artifactory, registry, yarnrc, berry, yarn

readme

Artifactory Access Configuration Utility

This utility automates a correct and secure NPM/Yarn package manager configuration for third-party registries – specifically Artifactory. It does this through a set of questions that eventually result in updated ~/.npmrc and ~/.yarnrc.yml files.

Important Compatibility Note

This CLI creates configuration files for NPM (~/.npmrc) and Yarn 2/Berry (~/.yarnrc.yml).

Usage

yarn create artifactory-access-config
npx create-artifactory-access-config

Pro Tip: You can configure default values for the registry and repository key questions via the REGISTRY and REPOSITORY_KEY environment variables. This comes in handy within onboarding guides!

REGISTRY="https://artifactory.example.com" REPOSITORY_KEY="npm-virtual" yarn create artifactory-access-config

Security

This CLI tries to apply common best practices for a secure authentication to a third-party registry. Please note that usage of this CLI results in a change to global configuration files residing within your $HOME directory. Be especially careful in case you are sharing your dotfiles!

changelog

Changelog

1.3.0

  • Option WRITE_TO_CWD=true added through which the identified configuration can be written to configuration files in the current working directory. This can come in handy for CI cases.

1.2.0

  • Support a non-interactive mode via a NON_INTERACTIVE=true env var.
  • Accept username / password values via environment variables USERNAME and PASSWORD.
  • Hide password input.

1.1.0

  • Also configure global .npmrc files.
  • Provide additional guidance via the CLI output.
  • Fix an error that occurs for Yarn 2 when the global config file is empty.

1.0.0

  • Initial Release