roddhjav / pass-import

A pass extension for importing data from most existing password managers
https://www.passwordstore.org/
GNU General Public License v3.0
806 stars 89 forks source link

Error: file.csv is not a exported 1password file – 1Password7 #75

Closed loup-brun closed 5 years ago

loup-brun commented 5 years ago

Hi, I'm using 1Password (Version 7.2.5). I tried to import my exported data using pass-import, but got the following error:

$ pass import 1password /home/louis/1p.csv
 [x] Error: /home/louis/1p.csv is not a exported 1password file

I tried both with the csv and 1pif formats, neither work.

I noticed 1Password translates the headers into my locale, but keeps the original ones between parentheses, so I parsed the file to strip the translations and keep the original.

Here are my columns:

reg_name,member_since,address,branchAddress,alias,aim,issuing_authority,bank,database,reg_code,pin,telephonePin,swift,order_number,conditions,order_date,expiry_date,expiry,birthdate,issue_date,homephone,support_email,reg_email,email,publisher_name,state,expires,provider,game,icq,airport_id,admin_console_username,username,initial,birthplace,cashLimit,pop_authentication,smtp_authentication,password,admin_console_password,wireless_password,disk_password,password,password,pin,pop_password,smtp_password,password,msn,routingNo,additional_no,membership_no,accountNo,pop_port,smtp_port,reservations_phone,cvv,support_contact_phone,nationality,fullname,name,username,pop_username,smtp_username,member_name,bankName,name,company_name,network_name,cardholder,owner,lastname,name,Notes,issuenumber,iban,ccnum,number,number,options,org_name,download_link,issuing_country,country,pin,creditLimit,port,cellphone,jobtitle,firstname,retail_price,occupation,reminderq,quota,remindera,wireless_security,pop_security,smtp_security,smtp_server,hostname,pop_server,server,department,sex,sid,forumsig,provider_website,website,publisher_website,website,skype,company,company,height,interest,phoneIntl,phone_local,phoneLocal,phone_tollfree,phoneTollFree,defphone,customer_service_phone,branchPhone,phone,Titre,order_total,busphone,Type,class,accountType,database_type,pop_type,type,URL,admin_console_url,support_contact_url,url,valid_from,validFrom,product_version,yahoo

I actually removed the few remaining extra (empty) columns which were in my locale only (probably new in 1Password 7), but all the rest remains well formed.

roddhjav commented 5 years ago

Hi, it seems the data format changed again. I will look on a solution to address this. Regarding 1pif could you tell me more regarding the issue. For this file format you should use:

pass import 1password4pif 1p.1pif
loup-brun commented 5 years ago

When I try a .1pif file (with the 1password4pif), I always get the same error (even with a super small file with 1 entry):

 [x] Error: invalid user ID, password encryption aborted.

Here's the sample file with an example entry:

{"uuid":"uhlmerbjxfg2jpiskrg7x55osi","updatedAt":1551325271,"locationKey":"example","securityLevel":"SL5","contentsHash":"5ba0e391","title":"my-example-title","location":"https:\/\/my-example-location.com","secureContents":{"URLs":[{"url":"https:\/\/my-example-url.com"}],"fields":[{"value":"s0me-ex@mple-pa$$word","name":"password","type":"P","designation":"password"},{"value":"my-custom-username","name":"username","type":"T","designation":"username"}],"sections":[{"title":"Éléments liés","name":"linked items"}]},"createdAt":1551325240,"typeName":"webforms.WebForm"}
***5642bee8-a5ff-11dc-8314-0800200c9a66***

Thanks!

roddhjav commented 5 years ago

This is different, it is not related to the importer itself. It is related to the gpgids present in .gpg-id. You need to ensure:

  1. All the public gpgids are present in your keyring.
  2. At least one private key is present in your keyring.
loup-brun commented 5 years ago

Nice it did the trick! Import with 1password4pif works! Thanks!

mewwts commented 4 years ago

I ended up having to use jq and op, but it worked really well https://gist.github.com/mewwts/35b6a9e3053f8882600d835a64b57684

roddhjav commented 4 years ago

Sure it works, op has a lot of advantages, like it has much more data available to export (like binary attachment). Once I get enough time, I plan to add direct support for it.