Skip to content

Commit

Permalink
ux: improve error message when timeout occurs trying to auth via IaaS (
Browse files Browse the repository at this point in the history
…#276)

- hint around the feature flag to disable auth via IaaS

Authored-by: Dennis Leon <[email protected]>
  • Loading branch information
DennisDenuto authored Oct 15, 2021
1 parent ad73f59 commit b867020
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/imgpkg/registry/auth/iaas_keychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func NewIaasKeychain(ctx context.Context, environFunc func() []string) (authn.Ke
keyring: keyring,
}, nil
case <-timeout.Done():
return nil, fmt.Errorf("Timeout occurred trying to enable iaas provider")
return nil, fmt.Errorf("Timeout occurred trying to enable IaaS provider. (hint: To skip authenticating via IaaS set the environment variable IMGPKG_ENABLE_IAAS_AUTH=false)")
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/imgpkg/registry/auth/iaas_keychain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestTimeoutWhenEnablingProvider(t *testing.T) {
})

if assert.Error(t, err) {
assert.Equal(t, "Timeout occurred trying to enable iaas provider", err.Error())
assert.Equal(t, "Timeout occurred trying to enable IaaS provider. (hint: To skip authenticating via IaaS set the environment variable IMGPKG_ENABLE_IAAS_AUTH=false)", err.Error())
}

return true
Expand Down

0 comments on commit b867020

Please sign in to comment.