Skip to content

Instantly share code, notes, and snippets.

@keikoro
Last active October 22, 2016 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keikoro/11346547 to your computer and use it in GitHub Desktop.
Save keikoro/11346547 to your computer and use it in GitHub Desktop.
show, add, delete collaborators on a git repository on GitHub from the CLI

list collaborators
-X GET is optional
$ curl -u 'USERNAME' -X GET https://api.github.com/repos/USERNAME/REPONAME/collaborators

add a collaborator
$ curl -u 'USERNAME' -X PUT -d '' https://api.github.com/repos/USERNAME/REPONAME/collaborators/COLLABORATORNAME

delete a collaborator
-d '' is optional
$ curl -u 'USERNAME' -X DELETE -d '' https://api.github.com/repos/USERNAME/REPONAME/collaborators/COLLABORATORNAME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment