pubCredentials top-level property

ConfigVariable<String> pubCredentials
final

The entire contents of the pub-credentials.json file.

Do not check this in directly. This should only come from secure sources.

You can find your current pub-credentials.json in the following locations:

  • Dart prior to 2.15.0: $HOME/.pub-cache/credentials.json.
  • Linux: $XDG_CONFIG_HOME/dart/pub-credentials.json if $XDG_CONFIG_HOME is defined, otherwise $HOME/.config/dart/pub-credentials.json.
  • Mac OS: $HOME/Library/Application Support/dart/pub-credentials.json
  • Windows: %APPDATA%/dart/pub-credentials.json

By default this comes from the PUB_CREDENTIALS environment variable.

Implementation

final pubCredentials = InternalConfigVariable.fn<String>(() =>
    Platform.environment["PUB_CREDENTIALS"] ??
    fail("pkg.pubCredentials must be set to deploy to pub."));