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
714 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 19, 2020 in Git & GitHub by MD
• 95,460 points
4,853 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,460 points
907 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, 2021 in Git & GitHub by MD
• 95,460 points
756 views
0 votes
0 answers

How do I resolve git saying "Commit your changes or stash them before you can merge"?

I made some changes to my local ...READ MORE

May 13, 2022 in Git & GitHub by Kichu
• 19,040 points
1,153 views
0 votes
0 answers

How can I save username and password in Git?

I want to do a push and ...READ MORE

May 24, 2022 in Git & GitHub by Kichu
• 19,040 points
820 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,300 points
1,399 views
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP