Search Postgresql Archives

Re: How to hide JDBC connection credentials from git?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 31 May 2016 at 11:32, Alexander Farber <alexander.farber@xxxxxxxxx> wrote:
Hello,

I work on several small Java projects (using Maven+NetBeans) and store them in a public git repository.

I would like to use PostgreSQL JDBC in some of the projects, but don't want to make the connection credentials of my database public.

Surely there are other developers out there, who have already faced similar problem.

Please share your solutions.

It is probably possible to put the database name/user/password into a *.properties file and then ignore it in git repository, but keep it in the workarea?

Thank you
Alex


Usually I use either a separate config file, or environment variables wrapped into a separate runner file. The properties file you mentioned is quite a good idea.
Just remember to provide a template file, so other programmers could create their own properties file without debugging the application. And document how I should make my own properties file, and run the app.

--
    regards Szymon Lipiński

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux