You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi! I was trying to set this up and seems like credential resolution panics the binary instead of outputting something like "Empty ~/,harbor/config, please " - the patch for this is rather easy, should I start a PR or is this a candidate for the mentorship program?
Cheers and thanks!
Abhinav.
The text was updated successfully, but these errors were encountered:
Hey @AbhinavMir and @Vad1mo.
I was just checking in on the issue, wanted to see if this is an OK solution :) (if so let me know I'll create a PR)
Given the error we can have at this point are regarding config issues it would make sense to exit quitely.
//pkg/utils/credential_store.gofuncresolveCredential(credentialNamestring) (Credential, error) {
credentialStore, err:=readCredentialStore()
iferr!=nil {
returnCredential{}, fmt.Errorf("failed to read credential store: %s", err)
}
...ifcredentialName=="" {
returnCredential{}, fmt.Errorf("current credential name not set, please login again")
}
...returnCredential{}, fmt.Errorf("no credential found for the name: %s, please login again with the credential name: %s", credentialName, credentialName)
}
//pkg/utils/utils.gofuncGetClientByCredentialName(credentialNamestring) *v2client.HarborAPI {
credential, err:=resolveCredential(credentialName)
iferr!=nil {
fmt.Print(err) // If error come from resolveCredential, it make sense to exist and print the user friendly message.os.Exit(1)
}
...
}
hi! I was trying to set this up and seems like credential resolution panics the binary instead of outputting something like "Empty ~/,harbor/config, please " - the patch for this is rather easy, should I start a PR or is this a candidate for the mentorship program?
Cheers and thanks!
Abhinav.
The text was updated successfully, but these errors were encountered: