lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 289 forks source link

Error: Peer certificate cannot be authenticated with given CA certificates. #663

Closed yt33 closed 8 months ago

yt33 commented 9 months ago

I was github.com/ansd/lastpass-go v0.0.1 and had this error when running

cmdString := fmt.Sprintf("echo '%s' | LPASS_DISABLE_PINENTRY=1 lpass login %s", password, username)
cmd := exec.Command("sh", "-c", cmdString)

var out bytes.Buffer
var errOut bytes.Buffer
cmd.Stdout = &out
cmd.Stderr = &errOut
err := cmd.Run()

if err != nil {
  return "", fmt.Error("%v " + errOut.String(), err)
}

After upgrading to the latest v0.4.0, still had this error.

I'm wondering if it's like https://github.com/lastpass/lastpass-cli/issues/88 Thanks

yt33 commented 9 months ago

Can run the command on my lastpass-cli (version LastPass CLI v1.3.6.1.g29953fd) with the same credential fine