mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
admin: Add service Set Credentials API (#3580)
This commit is contained in:
committed by
Harshavardhana
parent
20a65981bd
commit
f803bb4b3d
@@ -190,13 +190,11 @@ func minioInit(ctx *cli.Context) {
|
||||
enableLoggers()
|
||||
|
||||
// Fetch access keys from environment variables and update the config.
|
||||
accessKey := os.Getenv("MINIO_ACCESS_KEY")
|
||||
secretKey := os.Getenv("MINIO_SECRET_KEY")
|
||||
if accessKey != "" && secretKey != "" {
|
||||
if globalEnvAccessKey != "" && globalEnvSecretKey != "" {
|
||||
// Set new credentials.
|
||||
serverConfig.SetCredential(credential{
|
||||
AccessKey: accessKey,
|
||||
SecretKey: secretKey,
|
||||
AccessKey: globalEnvAccessKey,
|
||||
SecretKey: globalEnvSecretKey,
|
||||
})
|
||||
}
|
||||
if !isAccessKeyValid(serverConfig.GetCredential().AccessKey) {
|
||||
|
||||
Reference in New Issue
Block a user