I needed to create multiple Github repositories and grant access to them for different users. After creating the first repository by hand and granting access to it, I had enough of it. There are just too many damn clicks!

So I used the CLI. Github has a nice cli-program called gh. With it you can easily create new repositories:

gh repo create --public user/repo

Adding collaborators to the repository was a little bit harder since gh does not provide an easy way to do this. However you can easily talk to the REST-API with gh:

gh api --method=PUT repos/user/repo/collaborators/rndmh3ro -f permission=admin


Related posts: