By default, the Swift Client only works with HTTPS protocol. If you attempt to configure the client with an HTTP URL, you will get the following error:
Error: invalid URL:<URL>
To modify the Swift client to work with the HTTP protocol, do the following:
To set Artifactory as a Swift repository, run the following command using an HTTPS URL:
swift package-registry set <url>
This creates the
.swiftpm/configuration/registries.json
file, which contains the following information:{ "registries" : { "[default]" : { "url" : "<url to RT>/artifactory/api/swift/swift-local" } }, "version" : 1 }
Modify the URL in the
<url to RT>
field in the.swiftpm/configuration/registries.json
file toHTTP
instead ofHTTPS
.