github API-无法更新团队的存储库权限 [英] github API - Unable to update a repository permission for a team

查看:71
本文介绍了github API-无法更新团队的存储库权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用GitHub API更新团队的存储库权限

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

获取错误为

代码:400

Code: 400

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

尝试通过代码发送JSON.还是一样的错误.请在这里帮助我.

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

推荐答案

您没有发送有效的JSON.试试看:

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

这篇关于github API-无法更新团队的存储库权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆