Credentials not found when publishing a subproject


I am trying to publish my project but I need credentials for this. It only works if I specify them hardcoded in my subproject build.gradle. I do not want to have my username & password hardcoded in any file. I have found a way to provide them on the command line, but this only works for the root project and not for the subprojects.

Any tips?