Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Helpful error when okta credentials not in keyring (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
pelletier authored and Fauzyy committed Oct 29, 2019
1 parent 83fd411 commit 3a97126
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/okta.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ type OktaProvider struct {
func (p *OktaProvider) Retrieve() (sts.Credentials, string, error) {
log.Debugf("Using okta provider (%s)", p.OktaAccountName)
item, err := p.Keyring.Get(p.OktaAccountName)
if err == keyring.ErrKeyNotFound {
return sts.Credentials{}, "", errors.New("Okta credentials are not in your keyring. Please make sure you have added okta credentials with `aws-okta add`")
}
if err != nil {
log.Debugf("Couldnt get okta creds from keyring: %s", err)
return sts.Credentials{}, "", err
Expand Down

0 comments on commit 3a97126

Please sign in to comment.