有时候我们fork
别人的仓库后,仓库被别人锁死了:
This repository has been disabled.
Access to this repository has been disabled by GitHub Staff due to a violation of GitHub’s terms of service. Please contact support@github.com for more information or to request a review of this decision.
这时候一个锁死的仓库,自己打不开,又无法删除。
GraphQL
我想到的解决方法是使用GraphQL
进行操作,官网:GitHub GraphQL API v4 GitHub Developer Guide
可以使用curl
进行GraphQL
操作
先申请token
:New personal access token
勾选权限Delete repositories
,生成token后运行查询:
记得把token
换成自己的token:
curl -H "Authorization: bearer token" -X POST -d \
"{\"query\": \"query { viewer { login }}\" } " \
https://api.github.com/graphql
如果结果显示自己的用户名,表示申请成功:
{"data":{"viewer":{"login":"xxx"}}}
注意,你可以在GraphQL API Explorer | GitHub Developer Guide进行初步的操作使用,但Explorer
只能进行查询,无法修改和删除。
GraphQL不行
hub
有人推荐hub
,我尝试了一下:
snap install hub --classic
也不行。
发邮件
无法删除,唯一的办法是发邮件给GitHub Support
文档信息
- 本文作者:last2win
- 本文链接:https://last2win.com/2020/02/25/github-delete-repository/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)