28

I am in need to remove an attachment in github issues. How do I do this. When you remove the issue comment, the attachment is still in github. How can I explicitly target to remove an attachment?

The format of such attachments is

https://github.com/<projectname>/<repo>/files/<somenumber>/<filename>.txt

Simple git rm does not work.

0

3 Answers 3

26

It's not possible currently. GitHub allows you, to attach files (pdf, docx etc.) in comments, but there is no way to delete them.

The behavior is similar to images: you can upload it, but you can't delete it from their cloud.


Just in case you uploaded a file that really needs to be deleted, there is always a GitHub Support.

7
  • 5
    @FrédéricHenri But you can't delete images. Well, you can delete them from the post, but not from their cloud. Like I mentioned, there are needed Suportocat powers to do that. Oct 19, 2015 at 13:35
  • 1
    I don't think this is limited to owners/collaborators: help.github.com/articles/… . In our repository someone used this to host unrelated (potentially harmful) files and we had to ask github support to delete them.
    – wump
    Apr 25, 2016 at 11:26
  • 31
    I'm wondering how both GitHub and GitLab are getting away with this in 2019, since GDPR is a thing... eugdpr.org
    – ahogen
    Jul 10, 2019 at 7:00
  • 1
    You also cannot edit the answer out - the edit history is available forever.
    – skjerns
    Jan 4, 2021 at 14:53
  • 7
    This is the greatest free image hosting service I've seen. Unlimited quota for everything you need!
    – GetFree
    May 19, 2021 at 3:51
1

Right now you can try this link: https://support.github.com/request?q=delete+issue+attachment It opens a chatbot, you paste the url of the file and it should do it for you!

0

Go to this URL and try the Virtual Agent (it didn't work for me, replying "I don't understand that input" to the image URLs I send it.) or just file a support ticket like this using the account you uploaded the image with.

I accidentally uploaded an image that contains personal information that I don't want to share publicly while submitting an issue. Please delete it for me, thanks.

The image URL is:

https://github-production-user-asset-6210df.s3.amazonaws.com/75155322/265274495-2211b2a5-c757-4f42-9ed0-864a7809ad9e.png

Be aware that there are two URLs for an image you uploaded to a issue or comment, before redirect it starts with https://github.com/User/Repository/assets/, after redirect it starts with something like https://github-production-user-asset-6210df.s3.amazonaws.com/, I'm not sure which one is needed to delete an image or both is OK, I'll update this answer (hopefully) after they replied my ticket.

Update: According to GitHub Support, Just providing one of the two URLs is OK, but the Virtual Assistant isn't working now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.