Last active
September 15, 2022 00:17
-
-
Save hankehly/cc7f6c0fbcfd0e33de843b64b562e056 to your computer and use it in GitHub Desktop.
Blog Article Snippets - How to share private code without exposing it to the world
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Option 1: login command | |
aws codeartifact login --tool twine --domain <my_domain> --repository test123 | |
# Option 2: environment variables | |
export TWINE_USERNAME=aws | |
export TWINE_PASSWORD=`aws codeartifact get-authorization-token --domain <my_domain> --query authorizationToken --output text` | |
export TWINE_REPOSITORY_URL=`aws codeartifact get-repository-endpoint --domain <my_domain> --repository test123 --format pypi --query repositoryEndpoint --output text` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# byJ2ZXIiOjEsImlzdSI6MTY2MTY3MD… | |
export CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain <my_domain> --query authorizationToken --output text` | |
# https://<my_domain>-<account_id>.d.codeartifact.<region>.amazonaws.com/pypi/test123/ | |
export CODEARTIFACT_REPOSITORY_URL=`aws codeartifact get-repository-endpoint --domain <my_domain> --repository test123 --format pypi - query repositoryEndpoint --output text` | |
export CODEARTIFACT_USER=aws | |
poetry config repositories.test123 $CODEARTIFACT_REPOSITORY_URL | |
poetry config http-basic.test123 $CODEARTIFACT_USER $CODEARTIFACT_AUTH_TOKEN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment