https://github.com/pottava/ecr-creds
Managing Amazon ECR credentials
https://github.com/pottava/ecr-creds
docker ecr
Last synced: 3 months ago
JSON representation
Managing Amazon ECR credentials
- Host: GitHub
- URL: https://github.com/pottava/ecr-creds
- Owner: pottava
- License: mit
- Created: 2018-12-08T07:06:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-19T02:01:07.000Z (over 7 years ago)
- Last Synced: 2025-04-08T23:29:32.323Z (over 1 year ago)
- Topics: docker, ecr
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ECR creds
## Description
This is a CLI tool which retrieves credentials from Amazon ECR.
## Installation
curl (macOS):
```
$ curl -Lo ecr-creds https://github.com/pottava/ecr-creds/releases/download/v1.0.0/darwin_amd64
$ chmod +x ecr-creds
```
curl (Linux):
```
$ curl -Lo ecr-creds https://github.com/pottava/ecr-creds/releases/download/v1.0.0/linux_amd64
$ chmod +x ecr-creds
```
go:
```
$ go get github.com/pottava/ecr-creds
```
## Parameters
Common parameters:
Environment Variables | Argument | Description | Required | Default
------------------------- | --------------- | ------------------------------- | -------- | ---------
AWS_ACCESS_KEY_ID | access-key, a | AWS `access key` for API access | * |
AWS_SECRET_ACCESS_KEY | secret-key, s | AWS `secret key` for API access | * |
AWS_DEFAULT_REGION | region, r | AWS `region` for API access | | us-east-1
## Usage
```console
$ ecr-creds -a AKIAIOSFODNN7EXAMPLE -s wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY script | sh
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
```
```console
$ ecr-creds -a AKIAIOSFODNN7EXAMPLE -s wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY get
{
"account": "123456789012",
"host": "123456789012.dkr.ecr.us-east-1.amazonaws.com",
"user": "AWS",
"password": "xxxsomethingwhichcanbeusedasdockerpassword=",
"endpoint": "https://123456789012.dkr.ecr.us-east-1.amazonaws.com",
"expiresAt": "2018-12-31T12:30:00Z"
}
```
With environment variables:
```console
$ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
$ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$ ecr-creds get account
123456789012
```