project-satisfy / satisfy

Satis composer repository manager with a Web UI

Home Page:http://ludofleury.github.io/satisfy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gitlab Webhook: Configure to use ssh repository rather than https

wilfriedwolf opened this issue · comments

Hi there,

I'm just about to upgrade my satisfy instance which we are now using perfectly for some years. By then, I wrote a gitlab webhook which still works, but I'd rather use yours, since it can create repositories - great feature.

My problem is, that we are using git@gitlab.example.com:group/repo.git for the repositories and not
https://gitlab.example.com/group/repo.git, which gets written in satis.json when executing a webhook on a nonexisting repository.

I was playing arround a little, trying to adopt the https way, but I was not successful, since our repos are all private.
I even created an auth.json with the credentials of a user having access to our repo, but on executing

$ bin/satis build satis.json public --skip-errors --no-ansi --verbose --repository-url=https://gitlab.example.com/group/repo.git --repository-strict

I always get the username promt, so that does not work (or at least I have not found out how to configure it correctly)

My proposal now is to enable configuring the prefered clone url. I found the place where to do it, and I'll do a pull request, if you think this could be a good idea.

Never the less: how are you supposed to handle private gitlab projects?

Best regards,

Willi

Just change ordering here https://github.com/ludofleury/satisfy/blob/master/src/Playbloom/Satisfy/Webhook/GitlabWebhook.php#L58 , write a test and submit PR. I would love to review it ;)

The orderings allready changes, and I am willing to write a test, but.. never done it before :( What framework do you use, could you just give me a hint, how to start?

We use phpunit. There is plenty of tutorials on the web.