Feat: support --registry-name for proxy cache project creation#904
Feat: support --registry-name for proxy cache project creation#904rakshityadav1868 wants to merge 3 commits into
Conversation
|
@NucleoFusion
|
NucleoFusion
left a comment
There was a problem hiding this comment.
The implementation works, yes
But could you also modify the view to accommodate this?
Right now, if we only provide the --registry-name the view opens (as it should) but it does not auto-select the ID which was provided.
Steps to Reproduce
- Run
harbor-cli project create --registry-name dockerhub --proxy-cache - Fill the Initial details, and move to second page.
ERR: In the second page, dockerhub is not the one selected.
|
@NucleoFusion i think in this Pr it is fixed i have tried on this Pr branch cant find the issue |
Try some other registry |
|
@NucleoFusion |
|
Hi @rakshityadav1868 , Before raising any PR, you have to ask is there anyone working on this issue or not? Your activity is totally against the Open source contributing guideline. |
Signed-off-by: Rakshit Yadav <yadavrakshit60@gmail.com>
Signed-off-by: Rakshit Yadav <yadavrakshit60@gmail.com>
Signed-off-by: Rakshit Yadav <yadavrakshit60@gmail.com>
f552bd6 to
b1bca1a
Compare
|
Hi @NucleoFusion Reason for not using WithHideFunc:
Current approach:
Screen.Recording.2026-05-11.at.10.59.22.AM.mp4 |
|
One small clarification currently if neither --registry-id nor --registry-name is provided with --proxy-cache, it already throws an error before reaching the form flow (this behavior existed before my changes as well). |

Description
Previously, users had to manually list registries, parse the registry ID, and pass
--registry-idduring project creation. With this update, users can now directly provide the registry name and the CLI will internally resolve it to the corresponding registry ID before sending the request to Harbor.This keeps the existing Harbor architecture unchanged, since Harbor still internally operates using
registry_id.Fixes [feature]: Create project with --registry-name instead of --registry-id #900
New feature
Changes
1. Added
--registry-nameflagAdded support for a new CLI flag:
--registry-name2. Added registry name to ID resolution
Added logic to resolve registry names using:
api.GetRegistryIdByName(..)3. Updated validation logic
Updated proxy cache validation to support both:
--registry-id--registry-name