Gitlab

Install

wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/jammy/gitlab-ce_16.5.8-ce.0_amd64.deb/download.deb
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger mantic main > /etc/apt/sources.list.d/passenger.list'
apt-get update
sudo apt-get install -y libnginx-mod-http-passenger
if [ ! -f /etc/nginx/modules-enabled/50-mod-http-passenger.conf ]; then sudo ln -s /usr/share/nginx/modules-available/mod-http-passenger.load /etc/nginx/modules-enabled/50-mod-http-passenger.conf ; fi
  • initial ppassword in /etc/gitlab/initial_root_password

Configure

  • Change the port and use http by editing /etc/gitlab/gitlab.rb with

      external_url 'http://repo.flipdare.com'
      nginx['enable'] = false
      nginx['listen_port'] = 8192
      nginx['referrer_policy'] = 'same-origin'
      nginx['referrer_policy'] = false
      nginx['gzip_enabled'] = false
    
      puma['enable'] = false
      web_server['external_users'] = ['www-data']
      gitlab_rails['internal_api_url'] = 'http://repo.flipdare.com'
      gitlab_rails['trusted_proxies'] = [ '172.233.156.45/24']
    
      nginx['listen_addresses'] = ["0.0.0.0" ]
      registry_nginx['listen_addresses'] = ['*' ]
      mattermost_nginx['listen_addresses'] = ['*']
      pages_nginx['listen_addresses'] = ['*']
    
  • Config stuff

    sudo usermod -aG gitlab-www www-data mkdir /var/opt/gitlab/.passenger chown www-data:www-data .passenger

Cheat

admin servicegitlab-runsvdir.service
reconfiguregitlab-ctl reconfigure
Default user is root and the Password that was just set.
startgitlab-ctl start
statusgitlab-ctl status
after making changesgitlab-ctl reconfigure
gitlab-ctl restart
reset passwordgitlab-rake "gitlab:password:reset"
sudo gitlab-rake 'gitlab:password:reset[root]'

Troubleshooting

Redis

 /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket info replication

checkout

git config --global http.sslverify false