Skip to content

torrefatto/scredenziato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scredenziato

It's a portmandeu between two italian words:
"screanzato": one who misbehaves, missing the knowledge of the basic social norms
"credenziali": credentials, the secrets needed to be recognised

What is it?

This small tool conflates the functionalities of all the helpers found in docker-credential-helpers, in a single command line utility.

It tries to find the correct store where docker keeps the credentials for connecting to a registry in an authenticated way. If found, one can then query such store.

Examples

$ scredenziato list
registry1.example.org	user1
registry2.example.com	user2

$ scredenziato get registry1.example.org
user1
THE_SUPER_SECRET_PASSPHRASE

Check the help menu for other options

Compile

I am on GNU/Linux. This project has 4 supported targets:

  • GOOS=linux GOARCH=amd64
  • GOOS=darwin GOARCH=amd64
  • GOOS=darwin GOARCH=arm64
  • GOOS=windows GOARCH=amd64

Depending on the target, the resulting binary pulls in different dependencies. These, in the case of GOOS=linux and GOOS=darwin require also to use cgo. For this to work on linux with darwin target one needs a working osxcross toolchain (good luck and follow the steps in the readme) and a windows cross compiler (mingw is the choice on archlinux). You can build all the targets with

$ export DARWIN_VERSION=22.4
$ CC_darwin_amd64=/path/to/o64-clang \
CXX_darwin_amd64=/path/to/o64-clang++ \
CC_darwin_arm64=/path/to/aarch64-apple-darwin${DARWIN_VERSION}-clang \
CXX_darwin_arm64=/path/to/aarch64-apple-darwin${DARWIN_VERSION}-clang++ \
CC_windows_amd64=/path/to/x86_64-w64-mingw32-gcc \
CXX_windows_amd64=/path/to/x86_64-w64-mingw32-g++ \
make build

To facilitate this process, I included a Dockerfile that matches my development environment. To build it, simply run

$ make build-with-docker