# Public Space - Credentials

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpublic-space-credentials%2F33266%3E%5C
**Category:** 🔒 Gradio\
**Created:** [March 7, 2023, 4:29pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpublic-space-credentials%2F33266 "2023-03-07T16:29:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bradley6597](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bradley6597](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbradley6597)%5C
**Post date:** [March 7, 2023, 4:29pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpublic-space-credentials%2F33266%2F1 "2023-03-07T16:29:06Z")

</div>

Is there a way I can use gradio within a public Hugging Space but add credentials to it?  
I’m aware the credentials will be visible in the app.py if I use the auth command, so is there a way to get around this?

---

<div class="post-metadata">

**Author:** ![freddyaboulton](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/freddyaboulton/32/32732_2.png) [@freddyaboulton](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffreddyaboulton)%5C
**Post date:** [March 7, 2023, 4:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpublic-space-credentials%2F33266%2F2 "2023-03-07T16:40:38Z")

</div>

Hi @bradley6597 !

You can store the credentials as environment variables in the space and then read them is with `os.environ`.

---

<div class="post-metadata">

**Author:** ![bradley6597](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bradley6597](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbradley6597)%5C
**Post date:** [March 7, 2023, 5:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpublic-space-credentials%2F33266%2F3 "2023-03-07T17:57:02Z")

</div>

> [@freddyaboulton](#):
>
> You can store the credentials as environment variables in the space and then read them is with `os.environ`.

Hey @freddyaboulton,

How would I get them into the environment initially on a Hugging Space instance?

---

<div class="post-metadata">

**Author:** ![freddyaboulton](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/freddyaboulton/32/32732_2.png) [@freddyaboulton](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffreddyaboulton)%5C
**Post date:** [March 7, 2023, 6:09pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpublic-space-credentials%2F33266%2F4 "2023-03-07T18:09:12Z")

</div>

You can go to the `Settings` tab of your space and scroll down to where it says `Repository Secrets`

![space_secrets](https://us1.discourse-cdn.com/hellohellohello/original/2X/b/b8da54b6b0269b617a357c787d995fd2fa8a2b09.gif)
