Search code examples
gitgithubsshgitlabssh-keys

Remove a repository with a valid ssh key


similar question: https://stackoverflow.com/a/27868996/10189759 but it is not about ssh key

So, ssh is a common way of authenticating GitHub to read or write a repository.

since ssh key don't provide a read-only option, I want to know other than write (removing all commit, etc), what else could be dangerous.

Could I remove a repository using a valid ssh key?

=====================================================
ps: hope github could provide read-only option to ssh key in the future.


Solution

  • Could I remove a repository using a valid ssh key?

    Remote repository- No. You must need to use online portal in order to delete a repository with admin access.

    https://docs.github.com/en/github/administering-a-repository/deleting-a-repository

    More security options on using SSH - https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-ssh-certificate-authorities

    Update:

    I contacted Github support and got their response on this as well after posting this answer.

    enter image description here

    Github support has also mentioned the same link of documentation about deleting a remote repository.