Open llehn opened 8 years ago
What version of the NuGet.exe client are you using?
The protocol for how NuGet client interacts with a NuGet server over http is constantly "evolving", meaning it often breaks.
Does using the client directly on the second Klondike mirror a package correctly? if so, the issue is likely in Klondike.
I was using nuget 2.8. It worked when using directly the 2nd server. Today I tried with nuget 3.4.4. Here nothing works at all :(
The cause of the problem was something else, in case of one server.
I have an apache as reverse proxy with SSL, and my settings did not translate the http:// url in the odata api into https. Now I fixed that nuget instal works when going to second server.
The server-chain would probably work if someone implemented the proxy feature mentions in another issue.
I think we need to reopen this. So the scenario is still the same, klondike mirroring klondike
A is mirroing B: on A:
GET https://nuget.kardex.com/api/odata/FindPackagesById()?id=%27My.Package%27
gives this response:
{ "message": "Not authenticated."
}HTTP/1.1 200 OK
Content-Length: 1087
Server: Nowin
Date: Tue, 30 Aug 2016 08:28:32 GMT
Cache-Control: must-revalidate, max-age=0, private
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Authorization, Accept, Origin, X-NuGet-ApiKey
Content-Type: application/json; charset=utf-8
DataServiceVersion: 3.0
{
"odata.metadata":"https://nuget.kardex.com/api/odata/$metadata#Packages","value":[
{
"odata.mediaReadLink":"https://nuget.kardex.com/api/packages/My.Package/1.0.7/content","odata.mediaContentType":"application/zip","Id":"My.Package","Version":"1.0.7","NormalizedVersion":"1.0.7","Title":null,"DisplayTitle":"My.Package","Authors":"Kardex INternal","Owners":"Kardex INternal","IconUrl":null,"LicenseUrl":null,"ProjectUrl":null,"DownloadCount":1,"RequireLicenseAcceptance":false,"Description":"Infragistics binaries for PPG, Kardex internal","Summary":null,"ReleaseNotes":null,"Language":null,"Created":"0001-01-01T00:00:00","Published":"2016-08-29T20:32:37Z","LastUpdated":"2016-08-29T20:32:37Z","Dependencies":"","PackageHash":"kKWGMVtuj5w8PYhs/QQrkeWhl5qctw8d6jQKL4egX8w=","PackageHashAlgorithm":"SHA256","PackageSize":"0","Copyright":null,"Tags":null,"IsAbsoluteLatestVersion":true,"IsLatestVersion":true,"IsPrerelease":false,"Listed":true,"DevelopmentDependency":false,"VersionDownloadCount":0,"Score":0
}
]
which is correct. At this point A does not have a local copy of My.Package.
But when we do GET to the odata.mediaReadLink from the response like this:
GET https://nuget.kardex.com/api/packages/My.Package/1.0.7/content
instead of pulling the package from B and presenting it to the client what I get is this:
Message
Package My.Package version 1.0.7 not found.
This very mechanism works as intended, when B is not klondike, but the nuget.org gallery
I have a setup where I have Klodike which is solely a mirror of another Klondike which mirrors nuget and has some other packages pushed to it.
It doesn't work at all.
This is nuget output:
This is the logfile of the first Klondike (which is contacted by nuget)
This is the logfile of the second Klondike, which talks to nuget.org
Is this "by design"? Or can we make it work somehow?