Open donny-dont opened 5 months ago
@JonLiu1993 since you applied a repro label I tried to make a reproduction case and tried using public GitHub to do a NuGet feed. The public GitHub seems to allow a package that isn't associated with a repository while the GitHub Enterprise offering does not.
Internally we have a support ticket on this with GitHub so we can prolly close this.
The reason I added this label is that I successfully exported the package locally using the command ./vcpkg export zlib:x64-windows --nuget, and I created a C++ console project and used it normally, but I don’t have the environment to upload it to GitHub Packages to reproduce your issue.
PS F:\Feature-test\vcpkg> ./vcpkg export zlib:x64-windows --nuget
The following packages are already built and will be exported:
* vcpkg-cmake:x64-windows
zlib:x64-windows
Additional packages (*) need to be exported to complete this operation.
Exporting vcpkg-cmake:x64-windows...
Exporting zlib:x64-windows...
Creating NuGet package...
Created nupkg: F:\Feature-test\vcpkg\vcpkg-export-20240605-023504.1.0.0.nupkg
PM> Install-Package "vcpkg-export-20240605-023504" -Source "F:\Feature-test\vcpkg"
Attempting to gather dependency information for package 'vcpkg-export-20240605-023504.1.0.0' with respect to project 'nuget-project', targeting 'native,Version=v0.0'
Gathering dependency information took 6 ms
Attempting to resolve dependencies for package 'vcpkg-export-20240605-023504.1.0.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'vcpkg-export-20240605-023504.1.0.0'
Resolved actions to install package 'vcpkg-export-20240605-023504.1.0.0'
Retrieving package 'vcpkg-export-20240605-023504 1.0.0' from 'F:\Feature-test\vcpkg'.
Adding package 'vcpkg-export-20240605-023504.1.0.0' to folder 'C:\Users\test\source\repos\nuget-project\packages'
Added package 'vcpkg-export-20240605-023504.1.0.0' to folder 'C:\Users\test\source\repos\nuget-project\packages'
Added package 'vcpkg-export-20240605-023504.1.0.0' to 'packages.config'
Successfully installed 'vcpkg-export-20240605-023504 1.0.0' to nuget-project
Executing nuget actions took 854 ms
Time Elapsed: 00:00:00.9872465
The reason I added this label is that I successfully exported the package locally using the command ./vcpkg export zlib:x64-windows --nuget, and I created a C++ console project and used it normally, but I don’t have the environment to upload it to GitHub Packages to reproduce your issue.
GitHub Packages is available to all. If you go through the setup described in the docs you should be off and running in case you have to debug any issues in the future.
From speaking to the GitHub Support Team it appears that github.com is using v2 of GitHub Packages while the GitHub Enterprise offering is using v1. In v1 a package needs to be associated with a repository while in v2 that association isn't required. That's why I'm seeing an error when pushing to a GitHub Enterprise instance but not to github.com.
@JonLiu1993 the response from the GitHub engineers was that having <repository>
in the .nuspec
was necessary so I'll prolly start hacking on the vcpkg-tool repo. Updating the title and description so it refers to V1 of GitHub Packages since V2 works perfectly fine.
Thanks for your inquiry, please ping me if you need any help.
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
I'm attempting to use GitHub packages as a binary cache following the tutorial. The NuGet feed is on a local GitHub Enterprise installation.
From there I run.
The results with identifying data taken out look like
The API logs report
WARNING: No destination repository detected
which implied that within theNAMESPACE
there needed to be a repository namedmy-port_x64-windows
. The documentation doesn't refer to any naming requirements for the repository so this was unknown to me.Trying again the command still failed with the same error as ☝️ .
I had attempted to use an Artifactory feed as a binary cache earlier, which I could push to but it would never restore from since it was unable to find the package, so I downloaded that package. I unzipped it and added to the generated
.nuspec
aRepositoryUrl
to tell GitHub packages where things were meant to go.I created a package from that with the additional feed and was able to manually push it to GitHub packages and saw the result within the GitHub enterprise instance's UI.
So I think there are two issues happening here. One is on the GitHub side where it doesn't seem to be able to figure out where things should go based on the
<port>_<triplet>.<version>-vcpkg<hash>
which is being discussed with our support contact. One is on the vcpkg side where it doesn't seem to be able to specify a cache repo, or if there is a way it isn't documented.Thanks in advance for any help!
Related discussion 👇
Discussed in https://github.com/microsoft/vcpkg/discussions/23285