Error on import the Elasticsearch public GPG key into apt

In this thread, a user solved the problem by running the command separately. Perhaps try that?