Skip to content

Commit c61877e

Browse files
authored
Update the auth flags for registering repositories (#3101)
1 parent 4c35023 commit c61877e

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

docs/design-docs/07-package-orchestration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ GITHUB_TOKEN=<GitHub Personal Access Token>
509509

510510
$ kpt alpha repo register \
511511
--namespace default \
512-
--repo-username=${GITHUB_USERNAME} \
513-
--repo-password=${GITHUB_TOKEN} \
512+
--repo-basic-username=${GITHUB_USERNAME} \
513+
--repo-basic-password=${GITHUB_TOKEN} \
514514
https://github.com/${GITHUB_USERNAME}/blueprints.git
515515
```
516516

@@ -526,8 +526,8 @@ All command line flags supported:
526526
* `--deployment` - Boolean value; If specified, repository is a deployment
527527
repository; published packages in a deployment repository are considered
528528
deployment-ready.
529-
* `--repo-username` - Username for repository authentication.
530-
* `--repo-password` - Password for repository authentication.
529+
* `--repo-basic-username` - Username for repository authentication using basic auth.
530+
* `--repo-basic-password` - Password for repository authentication using basic auth.
531531

532532
Additionally, common `kubectl` command line flags for controlling aspects of
533533
interaction with the Kubernetes apiserver, logging, and more (this is true for

internal/cmdreporeg/command.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ Flags:
5050
--deployment
5151
Repository is a deployment repository; packages in a deployment repository are considered deployment-ready.
5252
53-
--repo-username
54-
Username for repository authentication.
53+
--repo-basic-username
54+
Username for repository authentication with basic auth.
5555
56-
--repo-password
57-
Password for repository authentication.
56+
--repo-basic-password
57+
Password for repository authentication with basic auth.
5858
5959
--directory
6060
Directory within the repository where to look for packages.
@@ -87,8 +87,8 @@ func newRunner(ctx context.Context, rcg *genericclioptions.ConfigFlags) *runner
8787
c.Flags().StringVar(&r.name, "name", "", "Name of the package repository. If unspecified, will use the name portion (last segment) of the repository URL.")
8888
c.Flags().StringVar(&r.description, "description", "", "Brief description of the package repository.")
8989
c.Flags().BoolVar(&r.deployment, "deployment", false, "Repository is a deployment repository; packages in a deployment repository are considered deployment-ready.")
90-
c.Flags().StringVar(&r.username, "repo-username", "", "Username for repository authentication.")
91-
c.Flags().StringVar(&r.password, "repo-password", "", "Password for repository authentication.")
90+
c.Flags().StringVar(&r.username, "repo-basic-username", "", "Username for repository authentication using basic auth.")
91+
c.Flags().StringVar(&r.password, "repo-basic-password", "", "Password for repository authentication using basic auth.")
9292

9393
return r
9494
}

internal/cmdreporeg/command_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func TestRepoReg(t *testing.T) {
7575
},
7676
{
7777
name: "AuthRegister",
78-
args: []string{"https://github.com/platkrm/test-blueprints.git", "--repo-username=test-username", "--repo-password=test-password"},
78+
args: []string{"https://github.com/platkrm/test-blueprints.git", "--repo-basic-username=test-username", "--repo-basic-password=test-password"},
7979
actions: []httpAction{
8080
{
8181
method: http.MethodPost,

0 commit comments

Comments
 (0)