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

Add ko login #277

Merged
merged 1 commit into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ container registry is via `docker login`, and `ko` does not require users to
install `docker` locally. To facilitate logging in without `docker` we expose:

```shell
ko auth login my.registry.io -u username --password-stdin
ko login my.registry.io -u username --password-stdin
```

## The `ko` Model
Expand Down
8 changes: 7 additions & 1 deletion cmd/ko/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ func main() {

// Also add the auth group from crane to facilitate logging into a
// registry.
cmds.AddCommand(cranecmd.NewCmdAuth())
authCmd := cranecmd.NewCmdAuth("ko", "auth")
// That was a mistake, but just set it to Hidden so we don't break people.
authCmd.Hidden = true
cmds.AddCommand(authCmd)

// Just add a `ko login` command:
cmds.AddCommand(cranecmd.NewCmdAuthLogin())

if err := cmds.Execute(); err != nil {
log.Fatalf("error during command execution: %v", err)
Expand Down