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,240 points
221 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,890 points

Related Questions In Git & GitHub

0 votes
1 answer

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

Hi@akhtar, You can use reset command to do ...READ MORE

answered Jul 18, 2020 in Git & GitHub by MD
• 95,240 points
1,747 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, 2020 in Git & GitHub by MD
• 95,240 points
186 views
0 votes
1 answer

How do I access my SSH public key?

Hi@akhtar, You can use the cat command in ...READ MORE

answered Jan 4 in Git & GitHub by MD
• 95,240 points
77 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
687 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
• 10,550 points
4,198 views
0 votes
1 answer
+15 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,450 points
1,196 views
+2 votes
1 answer