Add ko login (#277)

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.
This commit is contained in:
jonjohnsonjr
2020-12-22 09:12:27 -08:00
committed by GitHub
parent 771a2a36b4
commit 0427aed99b
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -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
+7 -1
View File
@@ -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)