klees
klees6mo ago

Using private GitHub-Repo with composer

I'm currently trying to include a private repo from GitHub into a PHP script using that require-syntax on top of the script. Currently I'm trying:
// require:
// git@github.com:my-org/my-private-repo.git
// require:
// git@github.com:my-org/my-private-repo.git
but the test runner for my script fails with Could not parse version constraint github.com:conceptsandtraining/auto-cat. Is there any way to use a private repo in my PHP script? Any way to configure composer with keys for GitHub? Any way to get hold of some composer.json to make the appropriate changes?
11 Replies
rubenf
rubenf6mo ago
I will let @Hugo confirm but I think we do no support private repo in php for now
Hugo C.
Hugo C.6mo ago
Indeed, we do not support private repo currently
klees
klees6mo ago
thanks for getting back to me so quickly. are there any plans to do so in the future?
rubenf
rubenf6mo ago
If we have enough enterprise requests for it Everything that is private repo/codebases is mostly gated under EE usually (cloud is EE)
klees
klees6mo ago
ok any other way to get my code into windmill without making it public? could I e.g. include some phar into windwill and call it from there?
rubenf
rubenf6mo ago
Right now, I think that wouldn't work
klees
klees6mo ago
k, thx I hope PHP support improves in the future. very interesting product, though
Hugo C.
Hugo C.6mo ago
if you're self hosting, i think you could mount a shared volume on your workers with php files and require them from your php script
klees
klees6mo ago
ok, sounds promising. any pointers to some docu about that approach?
Hugo C.
Hugo C.6mo ago
i don't think so but the two steps are: - mount shared volume on your workers: (https://docs.docker.com/storage/volumes/) - require the files inside your windmill script using the absolute path e.g. if you mount your volume at /mnt, you can write: require '/mnt/myfile.php'
klees
klees6mo ago
thanks a lot. I'll report back once I have tried. This works like charm. I added an according line in the worker-config in the docker-composer.yml and can then require scripts from there.