Complications with Composer, Private Plugin and Gitlab

I have a private Gitlab server. And I am working with a premium third party WordPress Plugin that does not have a Composer.json file.

I’ve successfully added it, committed to my Gitlab server and installed it via Composer.

The problem is I had to make the Plugin public on my Gitlab server. Which I’m pretty sure is a violation of the license.

But when I switch it to “Internal” - which means I can download it it if I authenticate, then the Composer update fails.

So I’m trying to figure out a way to pass the login credentials somehow or if there is maybe another method.

I understand this question looks more like I’m asking about Gitlab, but I imagine there are other users looking for a solution to this as well and on other systems like Github / BitBucket / etc… so I’m hoping the community has a solution even if it’s not something with Gitlab.

Thank you all for your time!

Assuming you can access your “internal” plugin repo on your gitlab server via SSH (i.e., without password), I’m guessing you need to add your gitlab server’s hostkey to your known_hosts.

The thread above has a lot more conceptual info that may be helpful.

Also be sure your ssh-agent has your keys loaded. If relevant ssh keys to connect to your gitlab server don’t appear in output of ssh-add -l, you must ssh-add.

1 Like

Awesome! Thank you. I will try this and if I get a solution I will report here and attempt to provide a pre-packaged solution that others can use.