The build fails with 401 errors while resolving dependencies Via jfrog Artifactory from Xcode

The build fails with 401 errors while resolving dependencies Via JFrog Artifactory from Xcode.

Xcode version: 14.3 Swift: 5.8

Configured swift registry and performed a login

swift package-registry set --global <artifactory-registry> swift package-registry login <artifactoryUrl>/api/swift/<RepoKey> --usaername <User> --password <Password> --no-confirm

In Xcode UI whenI hit the build play button it fails with below error.

Failed fetching releases from registry: Invalid registry response status ‘401’, expected ‘200’

swiftProject Source files for target SwiftPackageTest should be located under ‘Sources/SwiftPackageTest’, or a custom sources path can be set with the ‘path’ property in Package.swift

Source files for target SwiftPackageTest should be located under ‘Sources/SwiftPackageTest’, or a custom sources path can be set with the ‘path’ property in Package.swift

Here is the Package.swift and "myproject.myproject" with version "1.1.4" in my JFrog swift local repository.

Package.swift // swift-tools-version: 5.8 // The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package( name: "SwiftPackageTest", products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "SwiftPackageTest", targets: ["SwiftPackageTest"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. .package(id: "myproject.myproject", from: "1.1.4"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "SwiftPackageTest", dependencies: []), .testTarget( name: "SwiftPackageTestTests", dependencies: ["SwiftPackageTest"]), ] )

The build fails with 401 errors while resolving dependencies Via jfrog Artifactory from Xcode
 
 
Q