3

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.

Alex
  • 45
  • 1
  • 6
  • 1
    The Rails console is for GitLab system administrators. Do you have a Gitlab server? If yes, u need to start rails console, u dont need to install it. – hongnhat Jan 10 '22 at 03:59
  • My gitlab account was created by my group project . I am not sure if I have gitlab server. Is there a way to verify it? Sorry if this question is silly. – Alex Jan 10 '22 at 05:43
  • If you are an administrator of a self-managed GitLab instance, you can create a group access token in the Rails console. I dont think u are GitLab system administrators. Because you don't know if you have a server or not. Contact Your Project owner for more details. – hongnhat Jan 10 '22 at 07:29
  • I don't know what you want to do, but it clearly requires administrator. https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#group-access-tokens – hongnhat Jan 10 '22 at 07:31

1 Answers1

1

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250