The AddSecureRemoteProvider function didn't add secretKeyring to the remoteProvider struct.
diff --git a/viper.go b/viper.go index d95ca28..2b651f8 100644 --- a/viper.go +++ b/viper.go
@@ -286,6 +286,7 @@ endpoint: endpoint, provider: provider, path: path, + secretKeyring: secretkeyring, } if !v.providerPathExists(rp) { v.remoteProviders = append(v.remoteProviders, rp)