[ aws . codeartifact ]

login

Description

Sets up the idiomatic tool for your package format to use your CodeArtifact repository. Your login information is valid for up to 12 hours after which you must login again.

See ‘aws help’ for descriptions of global parameters.

Synopsis

  login
--tool <value>
--domain <value>
[--domain-owner <value>]
[--namespace <value>]
[--duration-seconds <value>]
--repository <value>
[--dry-run]

Options

--tool (string) The tool you want to connect with your repository

--domain (string) Your CodeArtifact domain name

--domain-owner (string) The AWS account ID that owns your CodeArtifact domain

--namespace (string) Associates a namespace with your repository tool

--duration-seconds (integer) The time, in seconds, that the login information is valid

--repository (string) Your CodeArtifact repository name

--dry-run (boolean) Only print the commands that would be executed to connect your tool with your repository without making any changes to your configuration

See ‘aws help’ for descriptions of global parameters.

Examples

To configure authentication to your repository with the login command

The following login example configures the npm package manager with a repository named test-repo in a domain named test-domain.

aws codeartifact login \
    --domain test-domain \
    --repository test-repo \
    --tool npm

Output:

Successfully configured npm to use AWS CodeArtifact repository https://test-domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/test-repo/
Login expires in 12 hours at 2020-11-12 01:53:16-05:00

For more information, see Getting started with the AWS CLI in the AWS CodeArtifact User Guide.