Skip to content

Commit

Permalink
replace dead/deprecated code.google.com/p/gopass with golang.org/x/cr…
Browse files Browse the repository at this point in the history
…ypto/ssh/terminal for reading password from stdin
  • Loading branch information
Cory Bennett committed Sep 19, 2015
1 parent 8f9e6f7 commit 03fce96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jira/cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cli

import (
"bytes"
"code.google.com/p/gopass"
"fmt"
"golang.org/x/crypto/ssh/terminal"
"net/http"
"net/http/httputil"
"os"
Expand All @@ -17,8 +17,9 @@ func (c *Cli) CmdLogin() error {
req, _ := http.NewRequest("GET", uri, nil)
user, _ := c.opts["user"].(string)

prompt := fmt.Sprintf("Enter Password for %s: ", user)
passwd, _ := gopass.GetPass(prompt)
fmt.Printf("Enter Password for %s: ", user)
pwbytes, _ := terminal.ReadPassword(int(os.Stdin.Fd()))
passwd := string(pwbytes)

req.SetBasicAuth(user, passwd)
log.Info("%s %s", req.Method, req.URL.String())
Expand Down

0 comments on commit 03fce96

Please sign in to comment.