2

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?

  • 1
    The answer will likely depend on the service. You should limit your question to asking about one or the other. – ale Jul 6 '17 at 17:49
  • Thanks @ale. This question is now only about Github; whereas this one is about Bitbucket. – Jedi Jul 7 '17 at 0:08
3

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:

  • Write a script to add any and all users as collaborators, either as a one-time execution or to use on-demand when you have new users to add.
  • If you have access to a web server, Microsoft form, or some other method for having the user submit a request or respond to a request, write a server-side script to add any user who responds to your email/form/etc. as a collaborator.

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.

  • 1
    Thanks. This will take a little bit of work; but it solves my problem. – Jedi Jul 10 '17 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.