Single Node Is Not Allowing To Set Built In Users

Hey,
I am having problems with my single node, I built elasticsearch on a test machine
i started configuring the security,enabled xpach and discovery type to single node.
When i try to set the built-in users i get:
ERROR:Failed to connect to elasticsearch at http://127.0.0.1:9200/_security/_authenticate?pretty. Is the url correct and elasticsearch running?
so then i tried this:
curl -X GET "127.0.0.1:9200"
And got:
"error":{"root_cuase":[{"type":"security_exception", "reason", "missing authenticatecatin credentialesfor REST requset [/] "header"{"www.authenticate": ""basic realm=/"security/" charset=\UTF-8"}}]"type":"security_exception", "reason":"missimg authenticaion credentials for REST requset [/]. {"www.authenticate": ""basic realm=/"security/" charset=\UTF-8"}}, "status":401}
Does anyone know whats my problem?
When i tried to configure the passwords without the discovery.type single node it did allow me, but i need the discovery.type
Thanks

There should be another line before that error that tells you exactly what failed.