How can I access a binary framework in the GitHub Release with SPM when the repo is private?
If I access my framework from a public repo then this works:
.binaryTarget(
name: “Xxxxxxx”,
url: "https://nexusxxxxx/nexus/content/repositories/xxxxx/multiplatformxc-release/1.2.3/multiplatformxc-release-1.2.3.zip",
checksum: checksum
)
But I want to access the same file from my github repo, which is private. The file is generated and saved the GitHub Release section.
So, the URL is something like:
https://github.com/xxxxx-uk/xxxxx-multiplatform/releases/download/v1.2.3/xxxxxx-multiplatform.xcframework.zip
Evidently, if I use something like:
.binaryTarget(
name: “Xxxxxxx”,
url: "https://github.com/xxxxx-uk/xxxxx-multiplatform/releases/download/v1.2.3/xxxxxx-multiplatform.xcframework.zip",
checksum: checksum
)
is going to fail because it is private, in fact, this is the error message I see from SPM:
artifact of binary target ‘Xxxxxxx’ failed download: invalid status code 404
(that is, unauthorized)
Is it possible that somehow we can use SSH authentication? (I am already using that for .package and it is working great)
If I use something like:
.binaryTarget(
name: “Xxxxxxx”,
url: "git@github.com:xxxxx-uk/xxxxx-multiplatform/releases/download/v1.2.3/xxxxxx-multiplatform.xcframework.zip",
checksum: checksum
)
is failing with this error:
invalid URL scheme for binary target ‘Xxxxxx; valid schemes are: https
(but as I said, it is working for packages)
So, is this technically possible? Thanks.