【发布时间】:2022-01-07 00:16:55
【问题描述】:
我想被动地检查 GitHub 安全令牌的权限(范围)(而不是将某些内容推送到存储库中)。我尝试了以下命令。我替换了 your_username: 你的访问令牌和我的仓库的 URL。但它显示一个错误。
curl:(3) URL 使用错误/非法格式或缺少 URL
curl -u your_username:your_access_token \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME/permission
【问题讨论】:
标签: rest github access-token github-api