Reputation: 203
I am pretty sure people have faced this issue before, but I am not able to find any solution.
I have been working on an android library and plan to make it open source by putting it on GitHub. I would like to, however, only expose the maven upload creds to some specific authorised users - the core maintainers of the library.
How is this possible? If I store the username and password in a file and add it to gitignore, I won't be able to share it with anyone else via GitHub. However, if I do add the file to git, it will end up going to a public repo and being shared with everyone.
Is there some way to specify in git that a given file should only be accessed by people whose email ids fall in a specified list? Am I missing something very obvious?
Upvotes: 1
Views: 431
Reputation: 203
I am going forward with the most straightforward approach I could find.
I'll be storing sensitive data in local.properties file, which is not checked into version control. This works for my project as currently I am the sole admin. If more people join, I'll need to share the file's contents manually with them, but that's okay with me for now.
This solution won't work for teams with more collaborators, or where such roles might need to be assigned/changed dynamically.
Upvotes: 1
Reputation: 164639
I would like to, however, only expose the maven upload creds to some specific authorised users - the core maintainers of the library.
You can't. Git is not an authentication manager. It does not operate per file, only per commit.
There are other options.
In both cases no matter how many shared secrets your project has you only need to share one secret, a decryption key or shared vault access.
Upvotes: 1