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

Project Create cmd not working #306

Open
bupd opened this issue Jan 9, 2025 · 2 comments
Open

Project Create cmd not working #306

bupd opened this issue Jan 9, 2025 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@bupd
Copy link
Contributor

bupd commented Jan 9, 2025

Description

project create command fails with the following error.

~/s/code/OSS/harbor-cli/main main*
❯ ./harbor-dev project create
credential with name '' not found%

Other commands seems to work fine such as list, view. the problem is only with the harbor project create for now.

@bupd bupd added bug Something isn't working good first issue Good for newcomers labels Jan 9, 2025
@bupd bupd added this to Harbor CLI Jan 9, 2025
@rizul2108
Copy link
Contributor

rizul2108 commented Jan 9, 2025

error is in this below function
https://github.com/goharbor/harbor-cli/blob/8dd8abb21c626fca3cb8488d027bb71c120967b0/pkg/utils/config.go#L171C1-L180C1

here we are creating a new viper client using viper.new and everywhere v as new client has been used instead viper should be used as it acts a global client for whole project and this same thing has been done in many places in this file so should I make PR fixing all those or should I fix only those lines concerned with the project create command

@rizul2108
Copy link
Contributor

@bupd can you please review the PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants