Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli-config set --session does not work for harbor client configuration #73

Open
pederhan opened this issue Aug 3, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@pederhan
Copy link
Member

pederhan commented Aug 3, 2023

Configuring the config with cli-config set does not modify the configuration of the instantiated Harbor API client - it only modifies the running config. Should we reload the client after every invocation of this command?

Example:

> cli-config get harbor.url
https://example.com/api/v2.0.
> cli-config set --session harbor.url https://demo.goharbor.io/api/v2.0
Set harbor.url to 'https://demo.goharbor.io/api/v2.0' ✅
> cli-config get harbor.url
https://demo.goharbor.io/api/v2.0
> user get pederhan
[ERROR] 403 Forbidden: GET https://example.com/api/v2.0. sure you have permissions to access the resource.

The API URL has not been updared on the client despite being updated in the config.

@pederhan pederhan added the bug Something isn't working label Aug 3, 2023
@pederhan pederhan added this to Harbor Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant