Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Authentication task for the cargo client used for installing Cargo crates.
Note
Cargo support in Azure Artifacts is currently in preview.
Syntax
# Cargo authenticate (for task runners) v0
# Authentication task for the cargo client used for installing Cargo crates distribution.
- task: CargoAuthenticate@0
inputs:
#azureDevOpsServiceConnection: # string. Alias: workloadIdentityServiceConnection. 'Azure DevOps' Service Connection.
#registryNames: # string. Registry names from config.toml.
configFile: # string. Required. config.toml file to authenticate.
#cargoServiceConnections: # string. Credentials for registries outside this organization/collection.
# Cargo authenticate (for task runners) v0
# Authentication task for the cargo client used for installing Cargo crates distribution.
- task: CargoAuthenticate@0
inputs:
configFile: # string. Required. config.toml file to authenticate.
#cargoServiceConnections: # string. Credentials for registries outside this organization/collection.
Inputs
azureDevOpsServiceConnection - 'Azure DevOps' Service Connection
Input alias: workloadIdentityServiceConnection. string.
If this is set, feedUrl is required. All other inputs are ignored.
registryNames - Registry names from config.toml
string.
Comma seperated list of registry names specified in your config.toml to authenticate. If this is set, workloadIdentityServiceConnection is required. All other inputs are ignored. Not compatible with cargoServiceConnections.
configFile - config.toml file to authenticate
string. Required.
Path to the config.toml file that specifies the registries you want to work with. Select the file, not the folder e.g. "/.cargo/config.toml".
cargoServiceConnections - Credentials for registries outside this organization/collection
string.
Credentials to use for external registries located in the project's config.toml. For registries in this organization/collection, don't specify this attribute; the build’s credentials are used automatically.
Use the task assistant to select the desired service connections.
Task control options
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
Output variables
None.
Requirements
| Requirement | Description |
|---|---|
| Pipeline types | YAML, Classic build, Classic release |
| Runs on | Agent, DeploymentGroup |
| Demands | None |
| Capabilities | This task does not satisfy any demands for subsequent tasks in the job. |
| Command restrictions | Any |
| Settable variables | Any |
| Agent version | 2.144.0 or greater |
| Task category | Package |