How to install gitlab-rails?

Viewed 1011

I am trying to create a group access token for Gitlab project. It requires the access to gitlab-rails console to do it. On gitlab tutorial, this is the link to install it: https://docs.gitlab.com/ee/administration/operations/rails_console.html

As I tried both Omnibus installations and installation from source. Here is what it says:

For Omnibus installations

sudo gitlab-rails console gives error:

sudo: gitlab-rails: command not found

For installations from source

sudo -u git -H bundle exec rails console -e production gives error:

sudo: unknown user: git

sudo: error initializing audit plugin sudoers_audit

I couldn't find any other tutorial or forum on how to install gitlab-rails command.

1 Answers

It requires the access to gitlab-rails console to do it.

This is no longer the case:

See GitLab 14.7 (January 2022)

Group access tokens

With group access tokens, you can use a single token to perform actions for groups, manage the projects within the group, and, in GitLab 14.2 and later, authenticate with Git over HTTPS.

Previously, group access tokens were limited to self-managed instances only, and could only be generated using the Rails console.

Now, you can create group access tokens using the UI and API.

You can define token name, expiration date, and scope. You can also revoke an existing group access token.

Thank you Fabio Huser for your contribution!

https://about.gitlab.com/images/14_7/group_access_token.png -- Group access tokens

See Documentation and Issue.

Related