Skip to content

Commit

Permalink
Update the auth flags for registering repositories (#3101)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortent committed May 6, 2022
1 parent 4c35023 commit c61877e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions docs/design-docs/07-package-orchestration.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ GITHUB_TOKEN=<GitHub Personal Access Token>

$ kpt alpha repo register \
--namespace default \
--repo-username=${GITHUB_USERNAME} \
--repo-password=${GITHUB_TOKEN} \
--repo-basic-username=${GITHUB_USERNAME} \
--repo-basic-password=${GITHUB_TOKEN} \
https://github.com/${GITHUB_USERNAME}/blueprints.git
```

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

Additionally, common `kubectl` command line flags for controlling aspects of
interaction with the Kubernetes apiserver, logging, and more (this is true for
Expand Down
12 changes: 6 additions & 6 deletions internal/cmdreporeg/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ Flags:
--deployment
Repository is a deployment repository; packages in a deployment repository are considered deployment-ready.
--repo-username
Username for repository authentication.
--repo-basic-username
Username for repository authentication with basic auth.
--repo-password
Password for repository authentication.
--repo-basic-password
Password for repository authentication with basic auth.
--directory
Directory within the repository where to look for packages.
Expand Down Expand Up @@ -87,8 +87,8 @@ func newRunner(ctx context.Context, rcg *genericclioptions.ConfigFlags) *runner
c.Flags().StringVar(&r.name, "name", "", "Name of the package repository. If unspecified, will use the name portion (last segment) of the repository URL.")
c.Flags().StringVar(&r.description, "description", "", "Brief description of the package repository.")
c.Flags().BoolVar(&r.deployment, "deployment", false, "Repository is a deployment repository; packages in a deployment repository are considered deployment-ready.")
c.Flags().StringVar(&r.username, "repo-username", "", "Username for repository authentication.")
c.Flags().StringVar(&r.password, "repo-password", "", "Password for repository authentication.")
c.Flags().StringVar(&r.username, "repo-basic-username", "", "Username for repository authentication using basic auth.")
c.Flags().StringVar(&r.password, "repo-basic-password", "", "Password for repository authentication using basic auth.")

return r
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmdreporeg/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestRepoReg(t *testing.T) {
},
{
name: "AuthRegister",
args: []string{"https://github.com/platkrm/test-blueprints.git", "--repo-username=test-username", "--repo-password=test-password"},
args: []string{"https://github.com/platkrm/test-blueprints.git", "--repo-basic-username=test-username", "--repo-basic-password=test-password"},
actions: []httpAction{
{
method: http.MethodPost,
Expand Down

0 comments on commit c61877e

Please sign in to comment.