2

I am trying to update a repository permission for a team with GitHub API as

curl -i -u user:pass -X PUT  -d "permission:push"  https://api.github.com/teams/123/repos/j/repo

Getting error as

Code: 400

{
  "message": "Problems parsing JSON",
  "documentation_url": "https://developer.github.com/v3/orgs/teams/#add-team-repo"
}

Tried sending JSON via code. Still same error. Please help me here.

jaks
  • 4,407
  • 9
  • 53
  • 68

1 Answers1

3

You're not sending valid JSON. Give this a try:

curl -i -u user:pass -X PUT  -d '{"permission": "push"}'  https://api.github.com/teams/123/repos/j/repo
Ivan Zuzak
  • 18,068
  • 3
  • 69
  • 61