I am trying to create a managed package using SFDX CLI.

I am executing a command

sfdx force:package:create -n name -t Managed -r force-app

but receiving an error

ERROR: You must specify a namespace for this package.

When I change sfdx-project.json to include namespace, I receive another error

$ sfdx force:package:create -n name -t Managed -r force-app

ERROR: The specified namespace is not owned by the dev hub.

I don't understand this error message.

How do I own specified namespace by Dev Hub?

1 Answer 1


Ok, looks like I have to create Developer Edition org and register a namespace there and then link it to my Dev Hub org due to documentation


  • You are correct. Once you do that, you can then create scratch orgs with that managed package.
    – sfdcfox
    Commented Jul 14, 2018 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .