jfrog-cli-core
jfrog-cli-core copied to clipboard
Missing "ForceNugetAuthentication" in repository template
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
- Run
jfrog rt rtc nuget-template.json
- Select "Create" template
- Select "local" or "remote"
- 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"
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"
} ]
@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.
@cyan21 @bthharper JFrog CLI 2.21.5 is released with a fix for this issue. We will appreciate your feedback about this fix. Thanks!