diff --git a/pkg/utils/credentials.go b/pkg/utils/credentials.go index 71adef9..00bacbc 100644 --- a/pkg/utils/credentials.go +++ b/pkg/utils/credentials.go @@ -3,6 +3,7 @@ package utils import ( "fmt" "os" + "strings" ) const ( @@ -29,10 +30,10 @@ func LoadCredentialsFromFile(secretPath string) (*Credentials, error) { t := &Credentials{} if accessKey, err := os.ReadFile(accessKeyPath); err == nil { - t.AccessKey = string(accessKey) + t.AccessKey = strings.TrimSuffix(string(accessKey), "\n") } if account, err := os.ReadFile(accountPath); err == nil { - t.Account = string(account) + t.Account = strings.TrimSuffix(string(account), "\n") } return t, nil