Daniel15 / simple-nuget-server

A very simple PHP NuGet server
MIT License
116 stars 43 forks source link

Added Functionality to Delete Package Versions #7

Closed TheLandlord closed 9 years ago

TheLandlord commented 9 years ago

The deletion of packages is helpful while testing package deployment. This functionality has the following features:

Daniel15 commented 9 years ago

Thanks for the pull request! I'm pretty busy at the moment but I'll take a look at this when I get a chance.

benklett commented 9 years ago

I tried this branch and expected it to work on my existing installation (db and packagefiles).

I edited the nginx config and added everything which is needed.

But still, nuget just says this:

Failed to process request. 'Not Allowed'.
The remote server returned an error: (405) Method Not Allowed..

I do not really know how to fix it. Maybe it does not work with an existing database?

TheLandlord commented 9 years ago

this sounds like a security issue. Can you try it on an new repository to see if it works.

On Tuesday, October 27, 2015, Benjamin Klettbach notifications@github.com wrote:

I tried this branch and expected it to work on my existing installation (db and packagefiles).

I edited the nginx config and added everything, which is needed.

But still, nuget just says this:

Failed to process request. 'Not Allowed'. The remote server returned an error: (405) Method Not Allowed..

I do not really know how to fix it. Maybe it does not work with an existing database?

— Reply to this email directly or view it on GitHub https://github.com/Daniel15/simple-nuget-server/pull/7#issuecomment-151464402 .

benklett commented 9 years ago

I just tried it. Cloned your repo, fixed permissions, pushed a package, checked nuget list and tried to delete it. But the message is still the same one.

Btw.: I am running it on Debian 8 with nginx version 1.9.4 and php 5.6.13-2 fpm.

Daniel15 commented 9 years ago

@TheLandlord - Wow, I'm so sorry I never got around to reviewing this!! I totally forgot about it :disappointed: I should keep a closer eye on this project. I'll take a look at this soon.

@benklett Make sure you have dav_methods PUT DELETE in your Nginx config.

benklett commented 9 years ago

@Daniel15 I have that. My Nginx config looks like this: http://hastebin.com/munuhemozu.nginx

Daniel15 commented 9 years ago

@TheLandlord - I implemented this in 4645fe883a72b2340d6ade4148e24aaed2a6bb75, based on some of the changes in your pull request, while also refactoring some of the existing code. Thanks!

Daniel15 commented 9 years ago

@benklett - Can you please try with the latest version? I just implemented package deletion, and the code is slightly different to this one. It might work for you.

benklett commented 9 years ago

Hm, I now get a different kind of error:

Failed to process request. 'SQLSTATE[HY000]: General error: 8 attempt to write a readonly database'.

I already tried fixing permissions, but that didn't help.

Daniel15 commented 9 years ago

Hmm, really strange.

Is the entire directory writable? SQLite needs the whole db directory to be writable, not just the file.

benklett commented 9 years ago

Oh yeah, sorry about that. The command from the README assumes that there is no content in the db directory. Now I added the "-R" option and it worked.

Thank you for your patience.