# Unable to generate a new identity from a PEM file

**URL:** <https://forum.dfinity.org/t/unable-to-generate-a-new-identity-from-a-pem-file/36148>\
**Category:** Command Line Tools\
**Tags:** nns\
**Created:** [October 14, 2024, 4:21am UTC](https://forum.dfinity.org/t/unable-to-generate-a-new-identity-from-a-pem-file/36148 "2024-10-14T04:21:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hokosugi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/hokosugi/32/7499_2.png) [@hokosugi](https://forum.dfinity.org/u/hokosugi)\
**Post date:** [October 14, 2024, 4:21am UTC](https://forum.dfinity.org/t/unable-to-generate-a-new-identity-from-a-pem-file/36148/1 "2024-10-14T04:21:57Z")

</div>

I want to generate a PEM file according to [this document](https://35k4u-jqaaa-aaaam-abrma-cai.icp0.io/docs/current/developer-docs/daos/nns/concepts/proposals/proposal-submit#create-a-privatepem-privatepublic-keypair-and-ledger-account-id) and create a new identity using the dex command, but I’m getting an error.  
The process is as follows.

```auto
dfx identity import proposals private.pem

```

The error is:

```auto
Error: Failed to validate pem file
Caused by: Failed to validate PEM content
Caused by: An error occurred while reading the file: missing data
Caused by: missing data

```

This time, the PEM file was created using the `quill generate` command, and it is requesting the creation of a password for encryption. However, I think this is due to the fact that the password for decrypting the PEM file was not requested in the process of importing the identity.  
How can I fix the error?

Incidentally, it is possible to re-import an existing PEM file with the `force` option. Also, based on the seed.txt generated by `quill generate`, it is possible to generate a new identity with the following command

```auto
dfx identity import --seed-file seed.txt proposals

```

Reference  
dfx: 0.24.0  
quill: 0.5.0

---

<div class="post-metadata">

**Author:** ![AdamS](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/adams/32/5248_2.png) [@AdamS](https://forum.dfinity.org/u/AdamS)\
**Post date:** [October 14, 2024, 2:57pm UTC](https://forum.dfinity.org/t/unable-to-generate-a-new-identity-from-a-pem-file/36148/2 "2024-10-14T14:57:23Z")

</div>

Those docs are unfortunately a little outdated - they were written before `quill` generated encrypted identities by default, and `dfx identity import` expects an unencrypted file. You can use the `quill decrypt-pem` command to generate an unencrypted pem file for importing into other tools, or you can import the identity via seed phrase with `dfx identity import --seed-file`.
