Attempting to open the Runners page in Admin I get a 500. Following steps on this issue, issue the following commands to resolve:
gitlab-rails console
> ApplicationSetting.first.delete
> ApplicationSetting.first
=> nill
Articles, notes and random thoughts on Software Development and Technology
Attempting to open the Runners page in Admin I get a 500. Following steps on this issue, issue the following commands to resolve:
gitlab-rails console
> ApplicationSetting.first.delete
> ApplicationSetting.first
=> nill
After setting up a self-hosted GitLab instance in a Proxmox LXC container using the Debian Turnkey GitLab template, the initial root user password didn’t seem to be what I set it to during install.
Assuming you can ssh into the instance, change the password of any user with:
sudo gitlab-rake "gitlab:password:reset"
This is from the docs here.
Gitlab by default runs on port 80. GitLab in a Docker container runs the same as a when natively installed, but to change the port you need to change the config, and change the exposed ports on the container.
First, per steps here, start the container with:
docker run --detach \
--hostname gitlab.example.com \
--publish host-https-port:container-https-port
--publish host-http-port:container-http-port
--publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
By default host-http-port and container-http-port are 80, and host-https-port container-https-port are 443. Change these to be whatever port you want to run on, but keep each pair the same (e.g. host-http-port and container-http-port = 8090)
When the container is up, start a shell into the running container:
docker exec -it containerid sh
and then edit the config file:
vi /etc/gitlab/gitlab.rb
and add line (at the top is ok):
external_url 'http://localhost:your-new-port-here
setting your-new-port-here to the new port.
Reconfigure the server:
gitlab-ctl reconfigure
gitlab-ctl restart
Done!
As part of putting together a GitLab CI pipeline to build a Python deployment for an AWS Lambda, I ran into an issue with the size of the build dir that I’m zipping up ready for deployment:
Uploading artifacts... ./build: found 2543 matching files ERROR: Uploading artifacts to coordinator... too large archive id=181 responseStatus=413 Request Entity Too Large status=413 Request Entity Too Large token=rtRUzgtp FATAL: Too large
Hmm. Ok. A quick search found this post which says there’s a setting to increase the max build artifact size – it’s under /admin/application_settings, in the Continuous Integration setting – looks like the default is 100MB, so let’s bump that up and try again: