Skip to content

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

Description

@pederhan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions