Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

v1.0.0

Choose a tag to compare

@user-cube user-cube released this 13 May 18:43
· 1 commit to main since this release
4e4cec9

Release Notes - Version 1.0.0

Overview

Auth Refresher, a command-line tool designed to simplify the process of managing Docker, AWS ECR, and Helm registry logins and logouts. The tool provides an intuitive interface for managing registries and supports YAML-based configuration for seamless integration.

Features

Core Functionality

  • Login Command:

    • Log in to Docker, AWS ECR, and Helm registries.
    • Automatically fetch AWS ECR credentials and log in via Docker or Helm.
    • Visual feedback during login operations using a spinner.
  • Logout Command:

    • Log out from Docker, AWS ECR, and Helm registries.
    • Updates the last_logout timestamp in the YAML configuration file.
  • List Command:

    • Display all configured registries in a tabular format.
    • Includes registry name, type, URL, and timestamps for the last login and logout operations.

Configuration

  • YAML-based configuration file located at ~/.auth-refresher/config.yaml.
  • Example configuration:
    last_used_registry: my-docker-registry
    name: My Registries
    registries:
      my-docker-registry:
        name: My Docker Registry
        type: docker
        url: https://index.docker.io/v1/
      my-aws-ecr:
        name: My AWS ECR
        type: aws
        url: 123456789012.dkr.ecr.us-west-2.amazonaws.com
        region: us-west-2
      my-helm-registry:
        name: My Helm Registry
        type: helm
        url: 123456789012.dkr.ecr.us-west-2.amazonaws.com
        region: us-west-2

Error Handling

  • Graceful error messages for unsupported or missing registry types.
  • Detailed feedback for failed login and logout operations.

Development Features

  • Written in Go, requiring Go 1.18 or later.
  • Easy to build and run locally:
    git clone https://github.com/user-cube/auth-refresher.git
    cd auth-refresher
    go build -o auth-refresher
    ./auth-refresher

Usage Examples

Login to a Registry

./auth-refresher login

Follow the prompts to select a registry and log in.

Logout from a Registry

./auth-refresher logout

Follow the prompts to select a registry and log out.

List Registries

./auth-refresher list

Displays all configured registries with their details.

Example Helm Login Command

For Helm registries, the tool executes the following commands internally:

AWS_REGION="us-west-2"
AWS_ACCOUNT_ID="123456789012"

# Get ECR credentials
export HELM_ECR_PASSWORD=$(aws ecr get-login-password --region $AWS_REGION)

# Log in to ECR via Helm registry
helm registry login \
    $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com \
    --username AWS \
    --password $HELM_ECR_PASSWORD