P
P
Polina2020-01-29 14:43:11
Java
Polina, 2020-01-29 14:43:11

How to hide telegram bot token data in open github repository?

The bot is written in java, ide - IntelliJ IDEA.
Smart people said you need to do it through an environment variable.
Googled only manuals for frameworks and OS.
Is there any difference at all between an environment variable and an environment variable?
Links would be very helpful :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Lamzin, 2020-01-29
@Byte255

All private data is taken out in the config. The config is removed from git control. An example of a config with asterisks instead of data is put into the repository.
A regular *.java class can be used as a config.

G
Gennady Furduy, 2020-01-29
@Xazan

Here's how it's done via environment variables
https://docs.oracle.com/javase/tutorial/essential/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question