jfrog / jfrog-azure-devops-extension

Apache License 2.0
48 stars 66 forks source link

task "Artifactory Tools Installer" raises error 401 #409

Closed Shahyads closed 1 year ago

Shahyads commented 1 year ago

Describe the bug

I'm using azure devops server 2020 and vsts agent 2.190.0

I can download jfrog cil from the following urls anonymously without authentication https://releases.jfrog.io/artifactory/jfrog-cli/v1/1.53.2/jfrog-cli-windows-amd64/jfrog.exe https://jfrog.bintray.com/jfrog-cli/v1/1.53.2/jfrog-cli-windows-amd64/jfrog.exe I created the service connection with empty username and password. I can verify and save it without any issue. However, the task "Artifactory Tools Installer" raises error 401 the root cause is on the code repository in the https://github.com/jfrog/jfrog-azure-devops-extension/blob/v1/artifactory-tasks-utils/utils.js at line 180 username is undefined similarly it could be in the code repository https://github.com/jfrog/jfrog-azure-devops-extension/blob/v2/jfrog-tasks-utils/utils.js at line 166 username is undefined

Current behavior

I created the JFrog Artifactory Service Connection with empty username and password. I can verify and save it without any issue. However, the task "Artifactory Tools Installer" raises error 401 the root cause is in the code repository https://github.com/jfrog/jfrog-azure-devops-extension/blob/v1/artifactory-tasks-utils/utils.js at line 180 username is undefined similarly it could be in the code repository https://github.com/jfrog/jfrog-azure-devops-extension/blob/v2/jfrog-tasks-utils/utils.js at line 166 username is undefined

Reproduction steps

1- create a jfrog artifactory service connection for "https://jfrog.bintray.com" or "https://releases.jfrog.io/artifactory" with empty username and password. 2- create a build pipeline add the task "Artifactory Tools Installer" then select service connection then choose jfrog-cli/v1 in the repository path 3-save and queue 4- the task will fail with the error 401 the root cause is in the @jfrog\artifactory-tasks-utils\utils.js at line 180 username is undefined

Expected behavior

No response

Azure DevOps extension name and version

1.13.6

JFrog CLI version

1.53.2

Operating system type and version

windows server 2019

JFrog Artifactory version (if relevant)

No response

JFrog Xray version (if relevant)

No response

JFrog Distribution version (if relevant)

No response

sverdlov93 commented 1 year ago

Hi @Shahyads , JFrog Azure Devops 2.7.0 is released and should fix the above issue. Looking forward to your feedback on it.