Reputation: 427
I'm trying to setup gitlab though Ansible. I'm using the ommibus package. Once it's installed. I need to install runner and mattermost.
In the both case, I needs to go to the gitlab web app in order to get some secrets hash to provide them to runner or mattermost.
For the runner it's called "registration token" and for mattermost it's called "application id" and "application secret".
I checked the gitlab api and there no way to get them, have you got any idea to get these secrets securely and programmatically?
Upvotes: 0
Views: 204
Reputation: 51
Since gitlab 10.5.1, you can create application via the Api:
https://docs.gitlab.com/ce/api/applications.html
and for creating a token for example for the first user i do:
sudo -u postgres psql -d gitlab_production -c "INSERT INTO personal_access_tokens VALUES ('1','1','SOMEHASH','initialToken','false','2020-01-01', '2018-01-01 12:00:00', '2018-01-01 12:00:00', E'--- \n- api \n- read_user \n');"
Upvotes: 1