Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Only Deletes allowed #7

Open
patrickfraley opened this issue Nov 20, 2017 · 2 comments
Open

Only Deletes allowed #7

patrickfraley opened this issue Nov 20, 2017 · 2 comments

Comments

@patrickfraley
Copy link

Hi,

I setup a docker server as the documentation describes, I can also push nuget packages into the server and see them on the filesystem /srv/www/packagesfiles but when I try to run

dotnet add package -s http://sulv082:8088/ drk.crm.api.common

it can not find the package. I also tried

dotnet add package -s http://sulv082:8088/index.php drk.crm.api.common

but then I get the "Only deletes allowed" message.

Where did I mess up? Any help would be appreciated :)

Best regards

@rolfwessels
Copy link

I'm having the same issue.

This is my docker compose setup

nugetserver:
    container_name: "nugetserver"
    image: "sunside/simple-nuget-server"
    restart: unless-stopped
    environment:
      NUGET_API_KEY: "{{ nuget_api_key }}"
      BASE_URL: "https://nuget.{{ mon_url }}"
    volumes:
      - /data/nuget/database:/var/www/db
      - /data/nuget/packages:/var/www/packagefiles
    labels:
      - "traefik.enable=true"
      - "traefik.frontend.rule=Host:nuget.{{ mon_url }}"

But when I go to the site the XML says

<service xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app" xml:base="http://nuget.xxxxxxxxxxxxxx.com//">
<workspace>
<atom:title>Default</atom:title>
<collection href="Packages">
<atom:title>Packages</atom:title>
</collection>
</workspace>
</service>

The base should be 'https://nuget.xxxxxxxxxxxxxx.com/' and not http://nuget.xxxxxxxxxxxxxx.com//.
It seems to be the double slash at the end that is breaking the request.

Nuget tries to resolve it to
Resolved actions to install package 'xxxxxxxxxx.5.1.0.47-develop'
GET http://nuget.xxxxxxxxxxxxxx.com//download/xxxxxxxxxx/5.1.0.47-develop

When I call that directly I only a response Only DELETEs allowed here. If I remove the double slash it works.

@rolfwessels
Copy link

@patrickfraley

The bug is not in this repo but rather in the simple-nuget-server. It has already been fixed but unfortunately this repo is not updated.

I ended up build and automating a new docker image from the main simple-nuget-server repo.

See this repo: https://github.com/rolfwessels/docker-simple-nuget-server
See this repo: https://hub.docker.com/r/rolfwessels/docker-simple-nuget-server/

rolfwessels added a commit to rolfwessels/simple-nuget-server that referenced this issue Dec 14, 2017
The base should be 'https://nuget.xxxxxxxxxxxxxx.com/' and not 'http://nuget.xxxxxxxxxxxxxx.com//.'
It seems to be the double slash at the end that is breaking the request.

Nuget tries to resolve it to
Resolved actions to install package 'xxxxxxxxxx.5.1.0.47-develop'
`GET http://nuget.xxxxxxxxxxxxxx.com//download/xxxxxxxxxx/5.1.0.47-develop`

When I call that directly I only a response Only DELETEs allowed here. If I remove the double slash it works.

See this issue.
sunsided/docker-nuget#7 for more details.
Daniel15 pushed a commit to Daniel15/simple-nuget-server that referenced this issue Jan 11, 2018
* Remove the additional slash. 

The base should be 'https://nuget.xxxxxxxxxxxxxx.com/' and not 'http://nuget.xxxxxxxxxxxxxx.com//.'
It seems to be the double slash at the end that is breaking the request.

Nuget tries to resolve it to
Resolved actions to install package 'xxxxxxxxxx.5.1.0.47-develop'
`GET http://nuget.xxxxxxxxxxxxxx.com//download/xxxxxxxxxx/5.1.0.47-develop`

When I call that directly I only a response Only DELETEs allowed here. If I remove the double slash it works.

See this issue.
sunsided/docker-nuget#7 for more details.

* Ensure that the baseURL ends with single '/'.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants