From 9b704ce8a1a4501483813d5bb51bed55addbfc5f Mon Sep 17 00:00:00 2001 From: andreasvikke Date: Wed, 2 Sep 2026 17:13:39 +0200 Subject: [PATCH 1/3] feat: add JFROG_CLI_CERTS_DIR integration test --- artifactory_test.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/artifactory_test.go b/artifactory_test.go index 18184cc7d..9d1537353 100644 --- a/artifactory_test.go +++ b/artifactory_test.go @@ -1635,6 +1635,32 @@ func TestArtifactorySelfSignedCert(t *testing.T) { assert.NoError(t, err) readerCloseAndAssert(t, reader) + // Remove the certificates from CLI security dir before testing custom cert dir location + defer clientTestUtils.RemoveAndAssert(t, filepath.Join(certsPath, certificate.KeyFile)) + defer clientTestUtils.RemoveAndAssert(t, filepath.Join(certsPath, certificate.CertFile)) + + // Create a new temp dir for certificates and set the CertsDir env variable + tempCertsDirPath, createTempDirCallback := coretests.CreateTempDirWithCallbackAndAssert(t) + defer createTempDirCallback() + setEnvCallBack = clientTestUtils.SetEnvWithCallbackAndAssert(t, coreutils.CertsDir, tempCertsDirPath) + defer setEnvCallBack() + + // Check the certificate dir have moved to the new temp dir location + certsPath, err = coreutils.GetJfrogCertsDir() + assert.NoError(t, err) + assert.Equal(t, tempCertsDirPath, certsPath) + + // Copy the server certificates to the custom CLI certificate dir and run again. We expect the command to succeed. + err = biutils.CopyFile(certsPath, certificate.KeyFile) + assert.NoError(t, err) + err = biutils.CopyFile(certsPath, certificate.CertFile) + assert.NoError(t, err) + searchCmd = generic.NewSearchCommand() + searchCmd.SetServerDetails(serverDetails).SetSpec(fileSpec) + reader, err = searchCmd.Search() + assert.NoError(t, err) + readerCloseAndAssert(t, reader) + serverDetails.ArtifactoryUrl = artAuth.GetUrl() cleanArtifactoryTest() } From e4ff6244754332d5f53d7a0c00af14c411e9eeb9 Mon Sep 17 00:00:00 2001 From: andreasvikke Date: Wed, 2 Sep 2026 17:25:09 +0200 Subject: [PATCH 2/3] feat: replace jfrog-cli-core with real implementation branch --- go.mod | 2 ++ go.sum | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 77e7b901e..02d98a0bc 100644 --- a/go.mod +++ b/go.mod @@ -248,3 +248,5 @@ require ( //replace github.com/ktrysmt/go-bitbucket => github.com/ktrysmt/go-bitbucket v0.9.80 // replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260604085947-7c110b77b4b4 + +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260825104024-c0852a819055 diff --git a/go.sum b/go.sum index d93de0b5f..bf29cee82 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,8 @@ github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KO github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260825104024-c0852a819055 h1:0P1Y5Bm+wRb0SZF9Cru0jqSe+KJ7gpSaIH9Zxf/8bmk= +github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260825104024-c0852a819055/go.mod h1:gf7aUg/G9JyltCNhwMD5RVEsFzUCKPWKXRcTXSqMYBk= github.com/andybalholm/brotli v1.2.2 h1:HzTuoo2ErYQqf5qvcJInB8uvqSVxRttzkFexPWtnceM= github.com/andybalholm/brotli v1.2.2/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= @@ -404,8 +406,6 @@ github.com/jfrog/jfrog-cli-application v1.0.2-0.20260820134442-c8629258ff3a h1:7 github.com/jfrog/jfrog-cli-application v1.0.2-0.20260820134442-c8629258ff3a/go.mod h1:p8yLtbmCxxQucIbLZKnWu0F+EDtj6NLXbRQCEK/nb6o= github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260902124259-4c1979144d2f h1:bsURaQbMymVB4u6R+CWxMho6zy4/kICq9eNrRio6WfI= github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260902124259-4c1979144d2f/go.mod h1:Oiq1Gc1RtmaDBmpVMQuG3XlmRAWXkA5bfRraHLwbZF0= -github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260831061529-c6dd293bccca h1:/Ox4k56Pbiow4qbkNrBOmgcnAHwIBjZOsJmS7dURJng= -github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260831061529-c6dd293bccca/go.mod h1:vuARjRZopsCqVcZmWzCgw5Pr9QD1FWvwFxijV4bvJJI= github.com/jfrog/jfrog-cli-evidence v0.11.1-0.20260824063609-79b735ec565e h1:+QYbewvK+PZKbfPpxYmy0bewhqMFtJPk/tUbCICjf8U= github.com/jfrog/jfrog-cli-evidence v0.11.1-0.20260824063609-79b735ec565e/go.mod h1:I83k7IH/cmMh00LyZOp13jctj8/pPKVHSAlu7GMJgwI= github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260618062042-6053ab368cab h1:Zn/qB8LYhSu82YDtbqXwErN1RPHTHe/a3gQY6Ti/OBE= From 03984fb57e3446b01243b2c458b3ea062815f0b9 Mon Sep 17 00:00:00 2001 From: andreasvikke Date: Thu, 10 Sep 2026 14:25:55 +0200 Subject: [PATCH 3/3] fix: point at new version of jfrog-cli-core --- go.mod | 2 +- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index d715fcb59..4d8fb2466 100644 --- a/go.mod +++ b/go.mod @@ -249,4 +249,4 @@ require ( // replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260604085947-7c110b77b4b4 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260825104024-c0852a819055 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260910085001-3ce79a0cc908 diff --git a/go.sum b/go.sum index aa3b8c8f0..8b1329b7d 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,8 @@ github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KO github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260825104024-c0852a819055 h1:0P1Y5Bm+wRb0SZF9Cru0jqSe+KJ7gpSaIH9Zxf/8bmk= -github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260825104024-c0852a819055/go.mod h1:gf7aUg/G9JyltCNhwMD5RVEsFzUCKPWKXRcTXSqMYBk= +github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260910085001-3ce79a0cc908 h1:Six9gtdxoQxNgf81Opr9FEcYV5OPT7LtbjNXWVXS1CE= +github.com/andreasvikke/jfrog-cli-core/v2 v2.0.100-0.20260910085001-3ce79a0cc908/go.mod h1:SwV+DNLBnWLxBeNeZpJk+xxAbqJ8ywq1va56up+AGu4= github.com/andybalholm/brotli v1.2.2 h1:HzTuoo2ErYQqf5qvcJInB8uvqSVxRttzkFexPWtnceM= github.com/andybalholm/brotli v1.2.2/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= @@ -406,8 +406,6 @@ github.com/jfrog/jfrog-cli-application v1.0.2-0.20260820134442-c8629258ff3a h1:7 github.com/jfrog/jfrog-cli-application v1.0.2-0.20260820134442-c8629258ff3a/go.mod h1:p8yLtbmCxxQucIbLZKnWu0F+EDtj6NLXbRQCEK/nb6o= github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260910080031-983313bcbc6e h1:/zfbJFo/FsvZptWuOxauzdtArdZmgbRfnoSUtOhf3Z8= github.com/jfrog/jfrog-cli-artifactory v0.8.1-0.20260910080031-983313bcbc6e/go.mod h1:sBP/2ovBQ5R2WyJ0shm3JkNNh4IpnVg7pS4sSoJlC1M= -github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260909093400-32a7208a18bd h1:tfC6CtOpqWoU/1V4ymBL0GnhM2kbq5JTGSaAk9eOybg= -github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20260909093400-32a7208a18bd/go.mod h1:SwV+DNLBnWLxBeNeZpJk+xxAbqJ8ywq1va56up+AGu4= github.com/jfrog/jfrog-cli-evidence v0.11.1-0.20260824063609-79b735ec565e h1:+QYbewvK+PZKbfPpxYmy0bewhqMFtJPk/tUbCICjf8U= github.com/jfrog/jfrog-cli-evidence v0.11.1-0.20260824063609-79b735ec565e/go.mod h1:I83k7IH/cmMh00LyZOp13jctj8/pPKVHSAlu7GMJgwI= github.com/jfrog/jfrog-cli-platform-services v1.10.1-0.20260618062042-6053ab368cab h1:Zn/qB8LYhSu82YDtbqXwErN1RPHTHe/a3gQY6Ti/OBE=