Can I programmatically access gitlab secrets hash?

0 votes

I have ansible on my control machine. I'm trying to setup gitlab using omnibus package. After this, I need to setup runner and mattermost.

In any case, I need the secret hash from gitlab web app to provide it to runner and mattermost.

Names:

Runner: 'regis-token'

mattermost: 'app- id' and 'app-secret'

I have checked the gitlab api and couldn't find a way to get them. I want to know is there any programmatical way through which we can access the secrets without comromising the security?

Mar 29, 2018 in Git & GitHub by Atul
• 10,250 points
96 views

1 answer to this question.

0 votes

The newer versions of gitlab do support application creation through API:

https://docs.gitlab.com/ce/api/applications.html

and to create a token you can do somthing like this:

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');"
answered Mar 29, 2018 by DareDev
• 6,850 points

Related Questions In Git & GitHub

0 votes
0 answers

How can I retrieve previous version data in Git & GitHub!!?

Hi, I accidentally commit in a wrong version. ...READ MORE

Feb 3 in Git & GitHub by akhtar
• 4,500 points
137 views
0 votes
1 answer

How can I set ssh key in GitHub?

Hi@akhtar, First you have to generate key using ...READ MORE

answered Feb 4 in Git & GitHub by MD
• 8,870 points
81 views
0 votes
1 answer

Version control as source to gitlab

The steps I'm going to tell you ...READ MORE

answered Apr 23, 2018 in Git & GitHub by ajs3033
• 7,280 points
371 views
0 votes
1 answer

How do I solve a Git checkout error: updating paths is incompatible with switching branches?

This error occurs when you are checking ...READ MORE

answered Jul 26, 2018 in Git & GitHub by Sophie may
• 9,940 points
1,274 views
0 votes
1 answer
0 votes
1 answer

How do I install Git on windows?

Hey @Akash, follow these steps: Go to this ...READ MORE

answered Feb 19, 2019 in Git & GitHub by Nikhil
96 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
421 views
0 votes
1 answer