Skip to content

Commit

Permalink
Add ko login (#277)
Browse files Browse the repository at this point in the history
This was previously `ko auth login`, which I've hidden, and perhaps we
can alias to `ko login` in the future, but in theory folks could have
been using `ko auth get`, and I don't want to break that for no reason.
  • Loading branch information
jonjohnsonjr committed Dec 22, 2020
1 parent 771a2a3 commit 0427aed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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

0 comments on commit 0427aed

Please sign in to comment.