我想被动地检查 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
Run Code Online (Sandbox Code Playgroud)