add link to gitlab autopkgtest task status
|Deletions are marked like this.||Additions are marked like this.|
|Line 65:||Line 65:|
|If you are upgrading ruby version to 2.7 (if your current ruby version is 2.5), then you need to manually update ruby-http from backports and ruby from fasttrack before installing gitlab.||If you are upgrading ruby version to 2.7 (if your current ruby version is 2.5), then you need to manually update ruby-http from backports and ruby from fasttrack before installing gitlab. Make sure /var/lib/gems/2.5.0/ is empty if you see any issues after the ruby version upgrade.|
|Line 166:||Line 166:|
|Line 203:||Line 201:|
Gitlab is a git front end with repository management, graphs, links, goodies, commands to run, and review capabilities similar in feel to a self-hosted ?GitHub.
Note 1: For a smooth upgrade experience, always stay on the latest major version of gitlab. For example, if latest version of gitlab is 12.0.0 and you are currently on 11.3.6, then update to 12.0.0 as soon as possible, certainly before the debian package is updated to 13.x. Ideally, you should update as soon as a new version with security updates is available.
Note 2: It is recommended to subscribe to changes in this wiki page or frequently check this page for updates. Alternatively, you can subscribe to https://tracker.debian.org/pkg/gitlab to get notified when new versions are uploaded.
Buster Fast Track (Recommended)
Gitlab 13.1.4 is available in unofficial fasttrack repo targeting buster as base distribution. (no open security issues).
Some packages are still needed from personal repo of gitlab maintainer because golang packages cannot be uploaded in fasttrack.debian.net because of a bug in dak setup. Please note the new URL of this repo if you are upgrading from an older version (people.debian.org/~praveen/gitlab is now people.debian.org/~praveen/gitaly and gpg key used for signing is also changed).
Make sure contrib section is enabled for buster and buster/updates
Modify /etc/apt/sources.list to add contrib section if missing:
deb http://deb.debian.org/debian buster main contrib deb http://security.debian.org/ buster/updates main contrib
And add the following lines:
deb https://fasttrack.debian.net/debian/ buster-fasttrack main contrib # For dependency packages not in testing only temporarily due to freeze, transitions or delayed by backports-new or NEW. deb https://fasttrack.debian.net/debian/ buster-backports main contrib deb https://deb.debian.org/debian buster-backports main contrib # Eventually the packages in this repo will be moved to fasttrack or official backports after fixing https://salsa.debian.org/fasttrack-team/support/-/issues/8 deb https://people.debian.org/~praveen/gitaly buster-backports main # Optional: To avoid some hours of delay between upload and availability in archive deb http://incoming.debian.org/debian-buildd buildd-buster-backports main contrib
Refresh list of available packages:
# apt update
You may encounter the following error message:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0B76920762A6B785
If so, these commands can help (trust these repositories):
# wget https://people.debian.org/~praveen/gitaly/praveen.key.new.asc # wget http://fasttrack.debian.net/fasttrack-archive-key.asc # apt-key add praveen.key.new.asc # apt-key add fasttrack-archive-key.asc
If you are upgrading ruby version to 2.7 (if your current ruby version is 2.5), then you need to manually update ruby-http from backports and ruby from fasttrack before installing gitlab. Make sure /var/lib/gems/2.5.0/ is empty if you see any issues after the ruby version upgrade.
See https://git.fosscommunity.in/debian-ruby/TaskTracker/-/issues/166 for current status of ruby 2.7 in fasttrack.
Only for upgrading ruby:
# apt -t buster-backports install ruby-http # apt install ruby # apt remove libruby2.5
Only for new installations (these packages are present in both backports and fasttrack. See 964916):
# apt install ruby-bootsnap ruby-commonmarker ruby-enumerable-statistics ruby-github-linguist ruby-google-protobuf ruby-gpgme ruby-grpc ruby-hamlit ruby-murmurhash3 ruby-prof ruby-prometheus-client-mmap ruby-re2 ruby-rugged ruby-stackprof ruby-thrift ruby-version-sorter unicorn ruby-temple/buster-backports
# apt -t buster-backports install gitlab
# aptitude -t buster-backports install gitlab
and choose n for first choice and then Y to prefer packages from fasttrack when it is available in both backports and fasttrack.
Note: https://gitlab.debian.net is running on this version.
Unstable (be careful when updating packages)
Gitlab 12.6.8 is available in unstable (many security issues), and installation is broken. Please use experimental.
We try to keep the version in unstable in a good shape with the latest security updates, but some times dependency updates break GitLab.
Experimental - During freeze and transitions
Gitlab 13.1.4 is available in experimental (no open security issues).
gitlab has cleared NEW queue and you no longer need to add this repo -> https://people.debian.org/~praveen/new/
If you are using experimental for the first time, check DebianExperimental.
Some rails 6 transition is delaying upload to unstable.
Install some dependencies from experimental,
# apt install git # apt -t experimental install ruby-rails # apt install ruby-aws-sdk/experimental ruby-rails-i18n/experimental # apt install ruby-gitaly/experimental gitaly/experimental gitlab-common/experimental
Currently gitlab installation is broken due to a change in libsass. A work around is to downgrade libsass and libsass-dev to 3.6.1. Use http://snapshot.debian.org/package/libsass/3.6.1-1/
Now install gitlab from experimental,
# apt install gitlab/experimental
Gitlab on Stretch
This is moved to gitlab/stretch now.
Gitlab with apache2
Gitlab can use apache instead of nginx. To get a working configuration for your version the best thing to do is to follow the (gitlab-recipes repository) instructions.
Basically you will have to : Disable nginx Set www-data as web server user. Allow Modules dependencies # mod_rewrite # mod_ssl # mod_proxy # mod_proxy_http # mod_headers
a2enmod rewrite proxy_http headers
and as says in recipe
Allow gitlab-workhorse to listen on port 8181, edit or create /etc/default/gitlab and change or add the following:
gitlab_workhorse_options="-listenUmask 0 -listenNetwork tcp -listenAddr 127.0.0.1:8181 -authBackend http://127.0.0.1:8080"
Gitlab Common Errors
If you have this kind of error
Cloning into'public-test-project-ssh'... Received disconnect from YOUR_SERVER_IP port 22:2: Too many authentication failures Disconnected from YOUR_SERVER_IP port 22 fatal: Can't read distant repository.
on an ssh clone
git clone email@example.com:public-test-group/public-test-project.git public-test-project-ssh
Note : In your command line host should match your ssh hostname for gitlab as group and project name.
To be sure you should find a line like the following in /var/log/auth.log
User gitlab from YOUR_CLIENT_IP not allowed because not listed in AllowUsers
You may have to allow gitlab user in /etc/ssh/sshd_config
AllowUsers user1 user2 gitlab AllowGroups user1 group2 gitlab
Note : user1, user2, group2 are here for the example adapt to your setup.
Do not forget to restart the service
service ssh restart
Debug installation and configuration
Gitlab is composed of several parts. As always logs (/var/log/gitlab), debian specific documentation (/usr/share/doc/gitlab/) and (official) documentation provide lots of information.
gitlab-rake is convenience script to easily run rake commands provided by gitlab in debian environment.
# gitlab-rake gitlab:check # gitlab-rake gitlab:env:info
gitlab-rails-console is another convenience script to launch a rails console in gitlab debian environment.
Just make sure you don't have any gems installed from rubygems.org conflicting with debian packaged versions of the gems required by gitlab. /var/lib/gems/<ruby_version> (/var/lib/gems/2.5.0 or /var/lib/gems/2.7.0) should not have any gems.
rake aborted errors during installation
If your update failed for some reason (usually when dependencies are not satisfied for bundle install --local), and you retry installation after fixing dependencies, you may see errors like
rake aborted! NameError: uninitialized constant Gitlab::Patch::ActiveRecordQueryCache /usr/share/gitlab/config/initializers/active_record_query_cache.rb:3:in `<top (required)>'
You will have to manually remove problem creating initializers from /etc/gitlab/initializers. A list of such initializers can be found from gitlab source package or from https://salsa.debian.org/ruby-team/gitlab in debian/maintscript file. All lines starting with rm_conffile and corresponding versions are what you need to check.
You can reach the maintainers of the gitlab package via
Matrix at #debian-gitlab:poddery.com (join via browser)
IRC #debian-gitlab on OFTC network (join via browser)
Installing gitlab on an lxc container to test - See gitlab/lxc
Updating gitlab package to newer versions - See Teams/Ruby/Packaging/newUpstreamRailsApp
Backport/Fasttrack checklist - See gitlab/BackportChecklist
Dependencies Transitions checklist - See gitlab/DependenciesTransitions
Managing Components - See gitlab/ManagingComponents
Plan to move gitlab-common binary to gitlab-shell source package - See ?gitlab/gitlab-common-to-gitlab-shell-plan
Aim to get gitlab back in main by bullseye release by packaging all node dependencies. current status This is now an Outreachy project (from December 2019 to March 2020).
Get autopkgtest working so we can detect problems when someone updates dependencies without coordinating with us. Current Status
Note: this section is about the installation of upstream-provided unofficial packages.
all actions are performed under the root user, in ~ unless otherwise noted.
navigate to https://about.gitlab.com/install/ and copy down the link to the Debian deb package.
as of this writing @ June 5, 2014
- dpkg -i gitlab*
i got errors 1st time around 2nd time around gitlab looked like it set everything and ran well.
To avoid errors, execute /opt/gitlab/embedded/bin/runsvdir-start for one minute, more or less (tested in 7.9.0 and 7.9.1 omnibus versions).
- gitlab-ctl reconfigure
to verify that things are running
- gitlab-ctl status
navigate to your servers IP address or domain name, and login as:
user: root password: 5iveL!fe