- Shell 93.6%
- Makefile 6.4%
| bin | ||
| .gitigonre | ||
| ct-login.sh | ||
| Makefile | ||
| Readme.md | ||
Container Tools Login
Installation
If you want to change the installation directory, set the INSTALL_DIR variable before running make install. For example:
INSTALL_DIR=~ make install
System Wide Installation
If you want that script to be available system-wide, run.
sudo make install
Uninstall
To uninstall the script, run:
sudo make uninstall
Local Installation
make user-install
Uninstall
To uninstall the script, run:
make user-uninstall
Usage
Login to a container registry.
ct-login <registry>
Podman login as a user:
ct-login -a <username>@<registry>
Help
Usage
ct-login [-afh] [REMOTE ...]
Options
-a Login in all configured remote registries without usernames.
-f Force login.
-h Print this help message.
Configuration
Script configuration
CT_LOGIN_CACHE_DIR
The cache dir. Timout files are stored in the cache
CT_LOGIN_REGISTRIES_DIR
The directory where the configuration files for a podman login are stored. (See Below)
CT_LOGIN_TIMEOUT
The timeout in seconds between successful logins. The timeout is used when a new login is requested and the "-f" flag is not used.
The script configuration is stored in /home/c9mos/.config/container-tools/ct-login.conf. It is a shell script and sourced by this script.
Registry Configuration
/home/$USER/.config/container-tools/.secrets/login/$REGISTRY_USER@$REMOTE.
The configurartion is stored in /home/$USER/.config/container-tools/.secrets/login/$REGISTRY_USER@$REMOTE. for automatic logins, make a symlink to the registry configuration file in the same directory. It is a shell script and sourced by this script.
/home/c9mos/.config/container-tools/.secrets/login/$REMOTE configurations.
Create a symlink to "$USER@$REMOTE" to enable default logins for your registries
$REMOTE is the registry to connect to. Examples:
- user@docker.io
- user@ghrc.io
- user@127.0.0.1
- docker.io
- localhost
Sample Registry Confiuration File:
REGISTRY_PORT=5000
REGISTRY_PASSWORD=PASSWORD_OR_TOKEN
Configuration Variables
REGISTRY_PORT:
The port of the registry.
REGISTRY_PASSWORD:
The password or token to be used for logging in. If not set, an empty password is used for the login.
REGISTRY_TIMEOUT:
The timeout in seconds between successful logins. Can be overridden with the -f option to force logins.