Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing "ForceNugetAuthentication" in repository template #330

Open
cyan21 opened this issue Feb 2, 2022 · 3 comments
Open

Missing "ForceNugetAuthentication" in repository template #330

cyan21 opened this issue Feb 2, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@cyan21
Copy link

cyan21 commented Feb 2, 2022

Describe the bug
Not possible to create a nuget local or remote repository with the "ForceNugetAuthentication" option enabled.
When running jfrog rt rpt, it doesn't offer this option in the "wizard"

To Reproduce

  1. Run jfrog rt rtc nuget-template.json
  2. Select "Create" template
  3. Select "local" or "remote"
  4. Select "nuget"

Expected behavior
Being able to create a Nuget repository with all the option available on the UI

Screenshots
If applicable, add screenshots to help explain your problem.

Versions

  • JFrog CLI core version: 2.8.3
  • JFrog CLI version (if applicable): 2.11.0
  • Artifactory version: 7.31.13

Additional context
After investigating, it might be related to a typo error here
shouldn't it be "ForceNugetAuthentication" instead of "ForceMavenAuthentication"

@cyan21 cyan21 added the bug Something isn't working label Feb 2, 2022
@bthharper
Copy link

bthharper commented Feb 8, 2022

I have been provided with a workaround for this issue.

Create the following json :

{
  "key" : "ych-dotnet-release-local",
  "packageType" : "nuget",
  "rclass" : "local",
  "description" : "created by automation",
  "notes" : "test",
  "includesPattern" : "**/*",
  "excludesPattern" : "",
  "repoLayoutRef" : "nuget-default",
  "forceNugetAuthentication" : true
}
jfrog rt curl -XPUT -T nuget-test.json -H "Content-Type: application/json" api/repositories/ych-dotnet-release-local

Which works for local repositories, but not for virtual repositories where I get the error:

PS c:\jfrog>  jfrog rt curl -XPUT -T templates\nuget\virtual.json  -H "Content-Type: application/json" api/repositories/nuget-repository {
  "errors" : [ {
    "status" : 400,
    "message" : "Cannot invoke org.artifactory.repo.VirtualRepositoryConfigurationImpl.setRepositories on bean class 'class org.artifactory.repo.VirtualRepositoryConfigurationImpl' - [java.lang.ClassCastException@7ec47b87](mailto:java.lang.ClassCastException@7ec47b87) - had objects of type \"java.lang.String\" but expected signature \"java.util.List\"\n"
  } ]

@eyalbe4
Copy link
Contributor

eyalbe4 commented Feb 9, 2022

@cyan21 and @bthharper -
Thanks for reporting this issue and sharing thr workaround.
We added this task to our work plan and we'll share an update here once this become available.

@gailazar300
Copy link
Contributor

@cyan21 @bthharper
JFrog CLI 2.21.5 is released with a fix for this issue.
We will appreciate your feedback about this fix.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants