#Using Private Dependency Framework with SPM

1 messages · Page 1 of 1 (latest)

eternal path
#

I feel like this is a silly question but I've been stuck for quite a while now. I'm trying to use a private framework with SPM. It works locally but when I'm building a Docker image it fail to fetch the repo.
Anyone knows the correct way to do that?

raw schooner
#

You mean a private github repository? And by locally you mean using Xcode? If so, it might be because you're signed with your github account into Xcode and thus it can fetch a private repo?

late mountain
#

If it’s working in Xcode or similar I’m guessing you have it set up to use the SSH URL in the package already. For docker you need to inject tour SSH key into the image by adding it to ~/.ssh

#

Usually done as an an env var

plain spear
#

This should work (please make sure the ssh file path is correct)

docker build -t CUSTOM_NAME --build-arg ssh_prv_key="$(cat ~/.ssh/id_rsa)"   ./
hollow tulip
#

If you use docker, here is what I did

#docker message