FiloSottile / age

A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.
https://age-encryption.org
BSD 3-Clause "New" or "Revised" License
15.79k stars 477 forks source link

Error decrypting a Postgres .pgpass file #406

Closed ghost closed 2 years ago

ghost commented 2 years ago

Environment

What were you trying to do

I encrypted several secret files and directories using Age 1.0.0~rc1 on a Debian Linux server. I installed age on the server via 'apt install age' (using the default Debian repositories). All of the files and directories decrypted fine on a separate Linux workstation running Age 1.0.0 except for one file. It was the Postgres .pgpass file from the server.

What happened

I used this command to decrypt the file

    age -i key.age -o .pgpass -d pgpass.age

I got this error message:

    Enter passphrase for identity file "key.age": 
    age: error: invalid armor closing line: 
    age: report unexpected or unhelpful errors at https://filippo.io/age/report
ghost commented 2 years ago

I should have Googled the error first. This is a known issue and the fix suggested here works:

https://gitfreak.com/FiloSottile/age/issues/263

Debian should really package 1.0.0 as I imagine a lot of people will run into this.