# Error no pem block while enrolling the Fleet Server with encrypted private Key

**URL:** <https://discuss.elastic.co/t/error-no-pem-block-while-enrolling-the-fleet-server-with-encrypted-private-key/356988>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [April 8, 2024, 3:11pm UTC](https://discuss.elastic.co/t/error-no-pem-block-while-enrolling-the-fleet-server-with-encrypted-private-key/356988 "2024-04-08T15:11:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![madra](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@madra](https://discuss.elastic.co/u/madra)\
**Post date:** [April 8, 2024, 3:11pm UTC](https://discuss.elastic.co/t/error-no-pem-block-while-enrolling-the-fleet-server-with-encrypted-private-key/356988/1 "2024-04-08T15:11:47Z")

</div>

hello,

We are getting the following error while enrolling the fleet Server: " "message":"Fleet Server - Error - 1 error: no PEM blocks"

````auto
elastic-agent enroll --force \
        --fleet-server-es="https:elasticsearch_node:9200" \
        --fleet-server-service-token=########################################################### \
        --fleet-server-policy=fleet-server-policy \
        --fleet-server-cert=/etc/elastic-agent/certs/certificate.cer \
        --fleet-server-cert-key=/etc/elastic-agent/certs/certificate.key \
        --fleet-server-cert-key-passphrase=/etc/elastic-agent/certs/passphrase \
        --fleet-server-es-ca=/etc/elastic-agent/certs/certificateauthorities_ca.cer \
        --certificate-authorities=/etc/elastic-agent/certs/certificateauthorities_ca.cer \
        --url=https://fleetServer_node:8220```

With unencrypted private key the command works!

We are using elasticsearch 8.11.3 Version

Could you please help us?
````
