mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
Added --trace flag and new log.Trace() lines for sensitive information (#541)
This commit is contained in:
parent
4f47851263
commit
7052346570
6 changed files with 25 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ func GetPullOptions(imageName string) (types.ImagePullOptions, error) {
|
|||
if auth == "" {
|
||||
return types.ImagePullOptions{}, nil
|
||||
}
|
||||
log.Debugf("Got auth value")
|
||||
log.Tracef("Got auth value: %s", auth)
|
||||
|
||||
return types.ImagePullOptions{
|
||||
RegistryAuth: auth,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ func EncodedEnvAuth(ref string) (string, error) {
|
|||
Password: password,
|
||||
}
|
||||
log.Debugf("Loaded auth credentials for user %s on registry %s", auth.Username, ref)
|
||||
log.Tracef("Using auth password %s", auth.Password)
|
||||
return EncodeAuth(auth)
|
||||
}
|
||||
return "", errors.New("Registry auth environment variables (REPO_USER, REPO_PASS) not set")
|
||||
|
|
@ -69,6 +70,7 @@ func EncodedConfigAuth(ref string) (string, error) {
|
|||
return "", nil
|
||||
}
|
||||
log.Debugf("Loaded auth credentials for user %s, on registry %s, from file %s", auth.Username, ref, configFile.Filename)
|
||||
log.Tracef("Using auth password %s", auth.Password)
|
||||
return EncodeAuth(auth)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue