lastpass / lastpass-cli

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

Ubuntu 16.04 `apt install lastpass-cli` doesn't log in #420

Closed Fazel94 closed 6 years ago

Fazel94 commented 6 years ago

Hello, When I do lpass login, I get an error stating that: bash Error: Peer certificate cannot be authenticated with given CA certificates. I have installed lastpass-cli using sudo apt install lastpass-cli in both Ubuntu 16.04 and 18.04. The output of apt show lastpass-cli is following:

→ apt show lastpass-cli 
Package: lastpass-cli
Version: 0.7.0-1
Priority: optional
Section: universe/utils
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Troy Heber <troyh@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 142 kB
Depends: libc6 (>= 2.14), libcurl3 (>= 7.16.2), libssl1.0.0 (>= 1.0.1d), libxml2 (>= 2.7.4), binutils
Download-Size: 51.2 kB
APT-Sources: http://de.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Description: command line interface to LastPass.com
 This application is a command line interface to the LastPass.com services. It
 brings both better security and convenience by allowing you to access, add,
 modify, and delete entries in your online LastPass vault, all from the
 terminal. You can also generate passwords for every server you use and
 securely store those passwords directly in LastPass. LastPass Enterprise
 features are supported as well, including Shared Folders.
 .
 Users who prefer the command line can access their data directly with “lpass
 ls” then using “lpass show -c --password Sitename” to put the Sitename
 password on the copy buffer. You can utilize “lpass show” to store passwords
 used in scripts, rather than putting passwords in the scripts themselves.
 LastPass can also be used as you work within the command line to help you
 login to servers. We’ve included some example scripts below.
 .
 The new tool is beneficial for LastPass users who want to use the command
 line to login to other machines as they work. There are examples such as
 contrib/examples/change-ssh-password.sh which shows automated password
 changing on a server. You could run it automatically on a nightly basis,
 regularly changing the password on the server as a security measure.
LuL1ll0 commented 6 years ago

You're running an old version of the LastPass CLI. Please update to version 1.3.2 and retest.

wkoszek commented 6 years ago

@Fazel94 Have you re-tried with a newer lastpass-cli?

jbskytap commented 6 years ago

TLDR: xenial/bionic universe repositories don't advertise the latest package versions via their packages.gz files. however they are present and can be found here: http://archive.ubuntu.com/ubuntu/pool/universe/l/lastpass-cli/

I installed this from the default repositories on 16.04 today and got the same issue. version 0.7 is what is configured in the ubuntu universe repositories. (from Packages.gz): --snip-- Package: lastpass-cli Priority: optional Section: universe/utils Installed-Size: 139 Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Troy Heber troyh@debian.org Architecture: amd64 Version: 0.7.0-1 Depends: libc6 (>= 2.14), libcurl3 (>= 7.16.2), libssl1.0.0 (>= 1.0.1d), libxml2 (>= 2.7.4), binutils Filename: pool/universe/l/lastpass-cli/lastpass-cli_0.7.0-1_amd64.deb --snip--

if you look into the directory indicated in the 'Filename' Path above you will find that 1.3.2 is there: --snip--

lastpass-cli_0.7.0-1.debian.tar.xz 2015-12-23 00:19 3.2K  
  lastpass-cli_0.7.0-1.dsc 2015-12-23 00:19 1.7K  
  lastpass-cli_0.7.0-1_amd64.deb 2015-12-23 00:20 50K  
  lastpass-cli_0.7.0-1_i386.deb 2015-12-23 00:20 56K  
  lastpass-cli_0.7.0.orig.tar.gz 2015-12-23 00:19 69K  
  lastpass-cli_1.0.0-1.2.debian.tar.xz 2017-02-01 06:23 6.2K  
  lastpass-cli_1.0.0-1.2.dsc 2017-02-01 06:23 1.8K  
  lastpass-cli_1.0.0-1.2_amd64.deb 2017-02-01 06:23 66K  
  lastpass-cli_1.0.0-1.2_i386.deb 2017-02-01 06:24 73K  
  lastpass-cli_1.0.0-1.2ubuntu1.debian.tar.xz 2018-02-28 22:18 6.3K  
  lastpass-cli_1.0.0-1.2ubuntu1.dsc 2018-02-28 22:18 1.9K  
  lastpass-cli_1.0.0-1.2ubuntu1_amd64.deb 2018-02-28 22:18 67K  
  lastpass-cli_1.0.0-1.2ubuntu1_i386.deb 2018-02-28 22:18 74K  
  lastpass-cli_1.0.0-1.2ubuntu2.debian.tar.xz 2018-06-13 17:03 7.0K  
  lastpass-cli_1.0.0-1.2ubuntu2.dsc 2018-06-13 17:03 1.2K  
  lastpass-cli_1.0.0-1.2ubuntu2_amd64.deb 2018-06-13 17:03 67K  
  lastpass-cli_1.0.0-1.2ubuntu2_i386.deb 2018-06-13 17:08 74K  
  lastpass-cli_1.0.0.orig.tar.gz 2016-11-02 04:50 94K  
  lastpass-cli_1.3.1-4.debian.tar.xz 2018-07-24 19:11 4.8K  
  lastpass-cli_1.3.1-4.dsc 2018-07-24 19:11 2.0K  
  lastpass-cli_1.3.1-4_amd64.deb 2018-07-24 19:18 83K  
  lastpass-cli_1.3.1-4_i386.deb 2018-07-24 19:18 90K  
  lastpass-cli_1.3.1.orig.tar.gz 2018-06-07 19:38 112K  

--snip--

Here is the entry from packages.gz in bionic/universe:

--snip--

Package: lastpass-cli Architecture: amd64 Version: 1.0.0-1.2ubuntu1 Priority: optional Section: universe/utils Origin: Ubuntu Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Troy Heber troyh@debian.org Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 185 Depends: libc6 (>= 2.14), libcurl4 (>= 7.16.2), libssl1.1 (>= 1.1.0), libxml2 (>= 2.7.4), binutils Filename: pool/universe/l/lastpass-cli/lastpass-cli_1.0.0-1.2ubuntu1_amd64.deb

--snip--

Fazel94 commented 6 years ago

I compiled lastpass-cli from the repo, It worked like a charm, Thank you all.