Skip to content

Instantly share code, notes, and snippets.

View benipeled's full-sized avatar

Beni Peled benipeled

View GitHub Profile
@Xiol
Xiol / README.md
Last active April 13, 2025 08:08
Extend Gitlab access token expiry dates

Extend Gitlab Access Tokens

Gitlab enforced token expiry limits to 365 days last year, and the time is now upon us.

They don't have an opt-out for this, and haven't provided a way to easily extend tokens in the web interface. They have also gated their credential management interface behind their Ultimate license.

This quickly thrown together script will allow you to add an extra year to all tokens that expire in the next 30 days. It will not reactivate tokens that have already expired.

Requires the python-gitlab module. Edit your self-hosted Gitlab instance details into the script and run it. It will dump out CSVs of all expiring tokens, and then dump out a list of commands you can paste into a gitlab-rails console session to extend the expiry date by another year. If you need them to be active for longer, change 1.year.from_now to the value of your choice, e.g. `10.years.fro

@tsuchm
tsuchm / buildah.yml
Created July 3, 2020 05:24
Ansible playbook to install buildah and podman
# https://github.com/containers/buildah/blob/master/install.md
- name: Add buildah repository key
apt_key:
url: https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key
state: present
- name: Enable buildah repository
apt_repository:
repo: deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /