# Password in application and version control

**URL:** <https://forum.xojo.com/t/password-in-application-and-version-control/43055>\
**Category:** General\
**Created:** [April 18, 2018, 5:03pm UTC](https://forum.xojo.com/t/password-in-application-and-version-control/43055 "2018-04-18T17:03:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_Boyd](https://forum.xojo.com/user_avatar/forum.xojo.com/craig_boyd/32/15397_2.png) [@Craig\_Boyd](https://forum.xojo.com/u/Craig_Boyd)\
**Post date:** [April 18, 2018, 5:03pm UTC](https://forum.xojo.com/t/password-in-application-and-version-control/43055/1 "2018-04-18T17:03:26Z")

</div>

Hi All,

I was wondering how some of you handle passwords and source control. For example, if you have an application that connects to a database you have to have some kind of connection to even hit the password tables to validate the user which means a stored user id and password is needed in the first place.  
I typically store that in a settings file that I explicitly exclude from source control.

Anyone else doing it differently? Is there a better way?

Thanks.

---

<div class="post-metadata">

**Author:** ![Kem\_Tekinay](https://forum.xojo.com/user_avatar/forum.xojo.com/kem_tekinay/32/154_2.png) [@Kem\_Tekinay](https://forum.xojo.com/u/Kem_Tekinay)\
**Post date:** [April 18, 2018, 5:18pm UTC](https://forum.xojo.com/t/password-in-application-and-version-control/43055/2 "2018-04-18T17:18:36Z")

</div>

We use .pgpass with our middleware app connecting to a Postgres database.

---

<div class="post-metadata">

**Author:** ![Craig\_Boyd](https://forum.xojo.com/user_avatar/forum.xojo.com/craig_boyd/32/15397_2.png) [@Craig\_Boyd](https://forum.xojo.com/u/Craig_Boyd)\
**Post date:** [April 18, 2018, 5:27pm UTC](https://forum.xojo.com/t/password-in-application-and-version-control/43055/3 "2018-04-18T17:27:53Z")

</div>

Hi Kem,

That is a great option for PostgreSQL databases, sadly that is not the only one I have to connect with and not all databases have an equivalent function. 🙂

Thanks.

---

<div class="post-metadata">

**Author:** ![Kem\_Tekinay](https://forum.xojo.com/user_avatar/forum.xojo.com/kem_tekinay/32/154_2.png) [@Kem\_Tekinay](https://forum.xojo.com/u/Kem_Tekinay)\
**Post date:** [April 18, 2018, 5:35pm UTC](https://forum.xojo.com/t/password-in-application-and-version-control/43055/4 "2018-04-18T17:35:08Z")

</div>

The other place we put info we want excluded from the repo is in an encrypted file in a known location like Application Data. The encryption key for that file is stored in the app but obfuscated. To be of any use, someone would need access to the source code (or decompile the app) and the file system. But then, if they have all that anyway, they have already gotten in.

---

<div class="post-metadata">

**Author:** ![Craig\_Boyd](https://forum.xojo.com/user_avatar/forum.xojo.com/craig_boyd/32/15397_2.png) [@Craig\_Boyd](https://forum.xojo.com/u/Craig_Boyd)\
**Post date:** [April 18, 2018, 5:45pm UTC](https://forum.xojo.com/t/password-in-application-and-version-control/43055/5 "2018-04-18T17:45:13Z")

</div>

That would work nicely.

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:10pm UTC](https://forum.xojo.com/t/password-in-application-and-version-control/43055/6 "2020-10-29T19:10:53Z")

</div>


