klees
klees5mo 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
rubenf5mo ago
I will let @Hugo confirm but I think we do no support private repo in php for now
Hugo C.
Hugo C.5mo ago
Indeed, we do not support private repo currently
klees
klees5mo ago
thanks for getting back to me so quickly. are there any plans to do so in the future?
rubenf
rubenf5mo 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
klees5mo 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
rubenf5mo ago
Right now, I think that wouldn't work
klees
klees5mo ago
k, thx I hope PHP support improves in the future. very interesting product, though
Hugo C.
Hugo C.5mo 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
klees5mo ago
ok, sounds promising. any pointers to some docu about that approach?
Hugo C.
Hugo C.5mo 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
klees5mo 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.