How to delete a GitHub repo using the API

后端 未结 2 1847
别跟我提以往
别跟我提以往 2020-11-30 05:00

I am getting familiar with the GitHub API http://developer.github.com/v3/ I am trying things out both with RESTClient plugin for Firefox and with curl command line tool.

2条回答
  •  难免孤独
    2020-11-30 05:55

    To delete a GitHub repo:

    curl \
      -X DELETE \
      -H "Accept: application/vnd.github.v3+json" \
      -H "Authorization: token ${token}" \
       https://api.github.com/repos/${username}/${reponame}
    

    Define or replace ${token}, ${username}, and ${reponame}. The token must have access to the delete_repo scope.

提交回复
热议问题