# Auth.json credentials in circleci build

**URL:** <https://discuss.circleci.com/t/auth-json-credentials-in-circleci-build/45989>\
**Category:** Build Environment\
**Created:** [November 3, 2022, 5:50am UTC](https://discuss.circleci.com/t/auth-json-credentials-in-circleci-build/45989 "2022-11-03T05:50:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbiggins](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cbiggins/32/31522_2.png) [@cbiggins](https://discuss.circleci.com/u/cbiggins)\
**Post date:** [November 3, 2022, 5:50am UTC](https://discuss.circleci.com/t/auth-json-credentials-in-circleci-build/45989/1 "2022-11-03T05:50:37Z")

</div>

Hi Guys,

I have a private bitbucket repo that I need to access during the build. I have this all working with my credentials in composer.json but I’d prefer they be out of the git repo if possible.  
Is there a way I can store these credentials in CircleCI to be used when needed?

Thanks,

Christian

---

<div class="post-metadata">

**Author:** ![rit1010](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rit1010/32/34738_2.png) [@rit1010](https://discuss.circleci.com/u/rit1010)\
**Post date:** [November 4, 2022, 11:38pm UTC](https://discuss.circleci.com/t/auth-json-credentials-in-circleci-build/45989/2 "2022-11-04T23:38:03Z")

</div>

At the project level you can store them as Environment Variables.

An alternative would be to place them in a third-party store like doppler, which can then sync them with one or more circleci projects. I’ve taken this to the extreme on some of my projects as doppler is providing the values needed not just to build a project, but also drive the deployment of the OS platform as well as the values used to define each of the running environments in the CI pipeline and production systems. The result is no .env files across our whole environment.

---

<div class="post-metadata">

**Author:** ![cbiggins](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cbiggins/32/31522_2.png) [@cbiggins](https://discuss.circleci.com/u/cbiggins)\
**Post date:** [November 7, 2022, 2:01am UTC](https://discuss.circleci.com/t/auth-json-credentials-in-circleci-build/45989/3 "2022-11-07T02:01:36Z")

</div>

Thanks for this.

The environment variable COMPOSER\_AUTH does exactly what I need.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [November 17, 2022, 2:02am UTC](https://discuss.circleci.com/t/auth-json-credentials-in-circleci-build/45989/4 "2022-11-17T02:02:34Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
