Coder Social home page Coder Social logo

Comments (10)

sergey-tihon avatar sergey-tihon commented on July 28, 2024

@knocte can you please try once again? I've published version without dots 3.0.0-alpha20210929190241

from fsharpx.collections.

knocte avatar knocte commented on July 28, 2024

@sergey-tihon thanks! looks like we're progressing, because now I get a different error:

% dotnet add myProject/myProject.fsproj package FSharpx.Collections --source https://nuget.pkg.github.com/fsprojects/index.json --version 3.0.0-alpha20210929190241
  Determining projects to restore...
  Writing /var/folders/kj/152c8zjj40lfmxd3dbjf_2kw0000gp/T/tmpjmY94a.tmp
info : Adding PackageReference for package 'FSharpx.Collections' into project 'myProject/myProject.fsproj'.
info : Restoring packages for /Users/knocte/Documents/Code/MyProject/myProject/myProject.fsproj...
info :   GET https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json
warn : Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
info :   Unauthorized https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json 823ms
log  : Retrying 'FindPackagesByIdAsync' for source 'https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json'.
log  : Response status code does not indicate success: 401 (Unauthorized).
info :   GET https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json
warn : Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
info :   Unauthorized https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json 598ms
log  : Retrying 'FindPackagesByIdAsync' for source 'https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json'.
log  : Response status code does not indicate success: 401 (Unauthorized).
info :   GET https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json
warn : Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
info :   Unauthorized https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json 574ms
error: Failed to retrieve information about 'FSharpx.Collections' from remote source 'https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json'.
error:   Response status code does not indicate success: 401 (Unauthorized).

from fsharpx.collections.

sergey-tihon avatar sergey-tihon commented on July 28, 2024

According to GitHub docs Installing NuGet package you need to authenticate first

from fsharpx.collections.

knocte avatar knocte commented on July 28, 2024

According to GitHub docs Installing NuGet package you need to authenticate first

Ehmm, what? If the packages are from an opensource repo that is public, I don't understand why authentication is needed.

I hope this doesn't mean that the restore stage needs authentication too? Will test...

from fsharpx.collections.

knocte avatar knocte commented on July 28, 2024

Strangely enough, I get again the error that I was getting at the beginning (before you pushed 4bdfae2 ):

% cat nuget.config 
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <clear />
        <add key="github" value="https://nuget.pkg.github.com/fsprojects/index.json" />
    </packageSources>
    <packageSourceCredentials>
        <github>
            <add key="Username" value="knocte" />
            <add key="ClearTextPassword" value="myPersonalAccessToken" />
        </github>
    </packageSourceCredentials>
</configuration>
% dotnet add myProject/myProject.fsproj package FSharpx.Collections --source https://nuget.pkg.github.com/fsprojects/index.json --version 3.0.0-alpha20210929190241
  Determining projects to restore...
  Writing /var/folders/kj/152c8zjj40lfmxd3dbjf_2kw0000gp/T/tmpjH44Td.tmp
info : Adding PackageReference for package 'FSharpx.Collections' into project 'NOnion/NOnion.fsproj'.
info : Restoring packages for /Users/knocte/Documents/Code/NOnion/NOnion/NOnion.fsproj...
info :   GET https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json
info :   OK https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json 1223ms
warn : The file '/Users/knocte/.local/share/NuGet/v3-cache/9f53714eb423b2f2c9fa5544820ecfa8484db3a9$github.com_fsprojects_index.json/list_fsharpx.collections.dat' is corrupt.
log  : Retrying 'FindPackagesByIdAsync' for source 'https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json'.
log  : '3.0.0-alpha2021.09.17.065817' is not a valid version string. (Parameter 'value')
info :   GET https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json
info :   OK https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json 1161ms
warn : The file '/var/folders/kj/152c8zjj40lfmxd3dbjf_2kw0000gp/T/NuGet/TempCache/fe7c0b31-58cc-4999-bcd1-7d0125674502/esmqk3jb.x0b' is corrupt.
log  : Retrying 'FindPackagesByIdAsync' for source 'https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json'.
log  : '3.0.0-alpha2021.09.17.065817' is not a valid version string. (Parameter 'value')
info :   GET https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json
info :   OK https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json 3860ms
warn : The file '/var/folders/kj/152c8zjj40lfmxd3dbjf_2kw0000gp/T/NuGet/TempCache/fe7c0b31-58cc-4999-bcd1-7d0125674502/3ckseefj.g35' is corrupt.
error: Failed to retrieve information about 'FSharpx.Collections' from remote source 'https://nuget.pkg.github.com/fsprojects/download/fsharpx.collections/index.json'.
error:   '3.0.0-alpha2021.09.17.065817' is not a valid version string. (Parameter 'value')

Maybe the authentication is failing and somehow the exposed error is this one by mistake? Take in account that I don't belong to the fsprojects organization.

from fsharpx.collections.

knocte avatar knocte commented on July 28, 2024

Tried to more things, FYI, to no avail:

% dotnet add myProject/myProject.fsproj package FSharpx.Collections --source https://nuget.pkg.github.com/fsprojects/index.json --version 3.0.0-alpha20210929190241 --prerelease
  Determining projects to restore...
  Writing /var/folders/kj/152c8zjj40lfmxd3dbjf_2kw0000gp/T/tmpYgGlnA.tmp
error: The --prerelease and --version options are not supported in the same command.


Usage: NuGet.CommandLine.XPlat.dll package add [options]

Options:
  -h|--help               Show help information
  --force-english-output  Forces the application to run using an invariant, English-based culture.
  --package               Id of the package to be added.
  --version               Version of the package to be added.
  -d|--dg-file            Path to the dependency graph file to be used to restore preview and compatibility check.
  -p|--project            Path to the project file.
  -f|--framework          Frameworks for which the package reference should be added.
  -n|--no-restore         Do not perform restore preview and compatibility check. The added package reference will be unconditional.
  -s|--source             Specifies NuGet package sources to use during the restore.
  --package-directory     Directory to restore packages in.
  --interactive           Allow the command to block and require manual action for operations like authentication.
  --prerelease            Allows prerelease packages to be installed.
knocte@apples-MacBook-Pro NOnion % dotnet add myProject/myProject.fsproj package FSharpx.Collections --source https://nuget.pkg.github.com/fsprojects/index.json --prerelease 
  Determining projects to restore...
  Writing /var/folders/kj/152c8zjj40lfmxd3dbjf_2kw0000gp/T/tmpJypRRa.tmp
info : Adding PackageReference for package 'FSharpx.Collections' into project 'NOnion/NOnion.fsproj'.
info :   GET https://nuget.pkg.github.com/fsprojects/fsharpx.collections/index.json
info :   OK https://nuget.pkg.github.com/fsprojects/fsharpx.collections/index.json 1191ms
error: '3.0.0-alpha2021.09.17.065817' is not a valid version string. (Parameter 'value')

from fsharpx.collections.

sergey-tihon avatar sergey-tihon commented on July 28, 2024

error: The --prerelease and --version options are not supported in the same command.

message say that you should not use --prerelease when you specify exact version.
Can you please try

dotnet add myProject/myProject.fsproj package FSharpx.Collections --source https://nuget.pkg.github.com/fsprojects/index.json --version 3.0.0-alpha20210929190241

from fsharpx.collections.

knocte avatar knocte commented on July 28, 2024

@sergey-tihon judging by your last reply, it seems you only read my last message, but not the previous one.

That is, the error I got about prerelease was just my last attempt at trying to find out if I was doing something wrong. I was aware of its error message, but just pasted it anyway, in case you were going to suggest me to use that flag.

Can you please try

Already tried, check my previous message (previous to the one where I pasted the --prerelease error).

from fsharpx.collections.

knocte avatar knocte commented on July 28, 2024

@sergey-tihon friendly ping :)

I was just wondering, that if these pre-release packages cannot be used by anyone that is not part of the fsprojects organization, wouldn't it be better to just publish these packages in nuget? By marking them as pre-release packages they wouldn't be used by anyone by default, only via opt-in for people who want unstable(prerelease) grade packages.

from fsharpx.collections.

sergey-tihon avatar sergey-tihon commented on July 28, 2024

@knocte sorry, I missed one your message.

I hope this doesn't mean that the restore stage needs authentication too? Will test...

I think that you will need to commit nuget.config in the repo in order to restore packages.
But if your personal token contains only one scope read:packages it should not be dangerous because there is no ways to misuse it.

image

pre-release packages cannot be used by anyone that is not part of the fsprojects organization

It cannot be so, because can download them manually even you not authenticated here https://github.com/orgs/fsprojects/packages?repo_name=FSharpx.Collections

log : '3.0.0-alpha2021.09.17.065817' is not a valid version string. (Parameter 'value')
Looks like nugget cannot work feed that contains versions that nuget count as invalid.
I've deleted all packages with incorrect version and able to install it without issue.

May I ask you try one time?

image

from fsharpx.collections.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.