atom / apm

Atom Package Manager
https://atom.io/packages
MIT License
1.26k stars 295 forks source link

Unpublishing fails with 'Unauthorized' when the package repository doesn't exist #221

Closed olmokramer closed 7 years ago

olmokramer commented 9 years ago

I tried unpublishing a package of which I had already deleted the repository on github. It failed with message: 'Unpublishing failed: Unauthorized'. When I recreated the repository (I left it empty) unpublishing worked again. To me it seems a bit strange that the github repo must exist when unpublishing a package... Also I think the error message I got isn't very clear about the actual issue...

saschaeggi commented 9 years ago

Same problem here. The git repo doesn't exist anymore and I can't unpublish the package now. But it also didn't worked when I recreated the repo again.

thedaniel commented 9 years ago

This is a common problem. Package permissions are tied to repo permissions and we don't do a very good job of communicating that.

deybhayden commented 9 years ago

I don't know if anyone is manually deleting packages - but I have one - https://atom.io/packages/debugger-lines that also can not be unpublished because I removed the repo before unpublishing.

thedaniel commented 9 years ago

This week I'll go through and manually remove packages and fix up everything that might need fixing up in the database all at once.

chuank commented 9 years ago

I have a similar issue with my package (particle-offline-compile). Some help to manually remove this package is appreciated, as I'd like to share the work with others.

The unpublishing criteria seems to be very precise and possibly unforgiving of packages that fail during any publish attempt. In fact this was why I had to unpublish – apm login failed for me the first time as used an invalid application token for my 2FA-protected account, but it was a dead-end from there on.

The initial failure caused everything else to fail, including any attempts to unpublish it ('Unauthorised') – and I still have my repo up then (it's been removed now).

Perhaps it might be possible for users to send a 'wipe' request via apm to atom.io?

danielbayley commented 8 years ago

The unpublishing criteria seems to be very precise and possibly unforgiving of packages that fail during any publish attempt. In fact this was why I had to unpublish – apm login failed

I have the same issue; I was just doing a test, so https://atom.io/packages/test needs to be deleted, but now also https://atom.io/packages/language-jxa for the same reason (it's permanently stuck on 0.2.0 now). I tried re-creating the repository on GitHub (as I have a local copy of the original) and then simply push everything back up, but that seems to mess up authorisation so I can neither publish nor unpublish. :disappointed:

So please @thedaniel could you delete the database entries for test and now language-jxa (so I can recreate the latter)?

This is a common problem. Package permissions are tied to repo permissions and we don't do a very good job of communicating that.

Shouldn' t it be more loose than that (based on the GitHub repository URL or something so that the repository can be replaced as a last resort as long as it has the exact same name-space) and all authorisation just uses the Atom.io API token?

Perhaps it might be possible for users to send a 'wipe' request via apm to atom.io?

Or something like this as a last resort so we're not creating issues/waiting for database entries to be removed manually…

Also see #315.

jasonrudolph commented 7 years ago

I tried unpublishing a package of which I had already deleted the repository on github. It failed with message: 'Unpublishing failed: Unauthorized'.

Thanks for reporting this issue. :bow: This should be resolved now. :sweat_smile:

If you were the owner of the package's repository on github.com and you've deleted the repository, you should be able to use apm unpublish to successfully unpublish the package. If you still run into an issue trying to unpublish the package, please let us know.