Differences between revisions 10 and 12 (spanning 2 versions)
Revision 10 as of 2024-08-15 12:34:18
Size: 1367
Editor: 192
Comment: rephrase a little bit.
Revision 12 as of 2024-08-15 13:19:24
Size: 1709
Editor: NickBannon
Comment: links to gitlab-rails docs
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:

<<BR>><<BR>>Alternatively, ssh into `gitlab`, then:
{{{
gitlab-rails console
foobar=User.find_by_login("<username>")
foobar.admin = 1
foobar.save
exit
}}}
(see also: https://docs.gitlab.com/ee/administration/operations/rails_console.html https://docs.gitlab.com/ee/administration/troubleshooting/gitlab_rails_cheat_sheet.html )

[TPG] has set up a "GitLab" instance on a VM, running at https://gitlab.ucc.asn.au/

GitLab is a git repository manager, similar to GitHub, and looks to be a good replacement for gitosis+gitweb.

Setup

It's a VM on medico, with a small HDD; a separate partition is available for /var to avoid filling the disk with logs.

GitLab itself was installed from a .deb acquired from the GitLab website, which installs to /opt/gitlab.

It's now kept up to date using the GitLab package server.

GitLab has been configured (using the config file in /etc/gitlab/gitlab.rb) to store repositories in /services/gitlab. This is a mount of services:/services/gitlab (the VM is only allowed access to this subdir, safety first.)

Management

To start/restart/stop the GitLab service, use the gitlab-ctl tool.

  • gitlab-ctl start - Start the services

  • gitlab-ctl stop - Stop the services

  • gitlab-ctl reconfigure - Apply any changes from /etc/gitlab/gitlab.rb

To promote a wheel member to admin role, go to https://gitlab.ucc.asn.au/admin/users and click the "Edit" for that user, set the "Access level" to "Administrator". Notice this is a user-level flag.



Alternatively, ssh into gitlab, then:

gitlab-rails console
foobar=User.find_by_login("<username>")
foobar.admin = 1
foobar.save
exit

(see also: https://docs.gitlab.com/ee/administration/operations/rails_console.html https://docs.gitlab.com/ee/administration/troubleshooting/gitlab_rails_cheat_sheet.html )

Documentation

Documentation of gitlab maintenance can be found at https://docs.gitlab.com/omnibus/maintenance/README.html