Companies generally deploy built artifacts on an internal repository. Open Source projects should be deployed on public repositories for users to download - this means Bintray and JCenter. Fortunately, Travis CI provides a lot of different remotes to deploy to, including Bintray.

Usually, only a dedicated branch should deploy to the remote e.g. release . That parameter is available in the configuration file:

deploy : - on : branch : release provider : bintray skip_cleanup : true file : target/bin/bintray.json user : nfrankel key : $BINTRAY_API_KEY

Note the above $BINTRAY_API_KEY variable. Travis CI offers environment variables to allow for some flexibility. Each of them can be defined as not to be displayed in the logs. Beware that in that case, it’s treated as a secret and it cannot be displayed again in the user interface.

For Bintray, it means getting hold of the API key on Bintray, creating a variable with a relevant name and setting its value. Of course, other variables can be created, as many as required.