I'd like to send out a URL to an external team such that anyone who clicks on it can join my private repository as a collaborator using a read-only role.
I don't want individually to add every person who needs access, nor do I want to give someone else the authority to do this.
Is there any way to do this using GitHub?
Best Answer
Only someone with admin rights to the repository can add collaborators, so there's no way for a potential collaborator to automatically add themselves via a URL.
However, you can use the GitHub API to programmatically add collaborators. You can make use of the API in several ways. Here are two possible approaches:
The second approach would be more precise, as it wouldn't add users who don't want to be collaborators, but it would also require more setup.