How to create a registries by bash

Hello ,

I am trying to build Rancher in automation script.

I run this command and get half of the need for crate a registry:

curl -u “${xxxxx}:${xxxxx}” \

-X POST
-H ‘Accept: application/json’
-H ‘Content-Type: application/json’
-d ‘{“description”:“xxxx”, “serverAddress”:“index.docker.io”}’
http://x.x.x.x:8080/v1/projects/1a15/registries

How can I set a user name and password?

Best regards

I found that
curl -u “${xxxxx}:${xxxxx}”
-X POST
-H ‘Accept: application/json’
-H ‘Content-Type: application/json’
-d ‘{“description”:“xxxxx”, “name”:“xxxxx”, “publicValue”:“xxxx”,“registryId”:“1sp19”, “email”:“xxxxx”}’
http://x.x.x.x:8080/v1/projects/1a15/registrycredentials