# How to create a registries by bash

**URL:** <https://forums.suse.com/t/how-to-create-a-registries-by-bash/3714>\
**Category:** Rancher 1.x\
**Created:** [August 16, 2016, 5:41am UTC](https://forums.suse.com/t/how-to-create-a-registries-by-bash/3714 "2016-08-16T05:41:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RotemEmergi](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@RotemEmergi](https://forums.suse.com/u/RotemEmergi)\
**Post date:** [August 16, 2016, 5:41am UTC](https://forums.suse.com/t/how-to-create-a-registries-by-bash/3714/1 "2016-08-16T05:41:42Z")

</div>

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://index.docker.io)”}’   
> > ‘[http://x.x.x.x:8080/v1/projects/1a15/registries](http://x.x.x.x:8080/v1/projects/1a15/registries)’

How can I set a user name and password?

Best regards

---

<div class="post-metadata">

**Author:** ![RotemEmergi](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@RotemEmergi](https://forums.suse.com/u/RotemEmergi)\
**Post date:** [August 16, 2016, 6:07am UTC](https://forums.suse.com/t/how-to-create-a-registries-by-bash/3714/2 "2016-08-16T06:07:51Z")

</div>

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](http://x.x.x.x:8080/v1/projects/1a15/registrycredentials)’
