Make username optional for create secret git
Git authentication with basic auth doesn't necessarily require a username to be present. Signed-off-by: talife <gilletvincent@gmail.com> Signed-off-by: Max Jonas Werner <mail@makk.es>
This commit is contained in:
committed by
Max Jonas Werner
parent
525bd21cd1
commit
a6cb5930f8
@@ -148,8 +148,10 @@ func buildSecret(keypair *ssh.KeyPair, hostKey, dockerCfg []byte, options Option
|
||||
return
|
||||
}
|
||||
|
||||
if options.Username != "" && options.Password != "" {
|
||||
secret.StringData[UsernameSecretKey] = options.Username
|
||||
if options.Password != "" {
|
||||
if options.Username != "" {
|
||||
secret.StringData[UsernameSecretKey] = options.Username
|
||||
}
|
||||
secret.StringData[PasswordSecretKey] = options.Password
|
||||
}
|
||||
if options.BearerToken != "" {
|
||||
|
||||
Reference in New Issue
Block a user