keyring backend for GitLab package indexes
Project description
keyring-gitlab-pypi is a backend for keyring which recognises GitLab package registry URLs.
It is designed for use with uv.
How to use
-
Install keyring with this backend
uv tool install keyring --with keyring-gitlab-pypi
-
Create a personal access token with
read_apiscope and add it to~/.config/gitlab-pypi.toml:["https://gitlab.com"] token = "<token>"
-
Configure
keyring-providerin uv:-
using an environment variable:
export UV_KEYRING_PROVIDER=subprocess
-
or in
uv.toml:keyring-provider = "subprocess"
-
or using the option
uv sync --keyring-provider=subprocess
-
-
Configure one or more GitLab package indexes
For example, in
pyproject.toml:[[tool.uv.index]] name = "myindex" url = "https://gitlab.example.com/api/v4/projects/1/packages/pypi/simple" authenticate = "always"
Note
You need
authenticate = "always"for uv to invoke keyring when no username is specified. This option is a good idea anyway!Alternatively, add the username
__token__to the URL, but this is not recommended forpyproject.tomlas you likely want to use a different username in CI, for example. -
Done!
keyring-gitlab-pypiwill return your token for URLs that look like package installs.
Motivation
- When using multiple GitLab package indexes, it can be cumbersome to configure them with the same token via environment variables or otherwise.
- keyring's keychain backend on macOS does not support
--mode creds - uv will reuse credentials for URLs on the same host, but it feels fragile to just configure one of the indexes and let the credentials cache serve the rest. At the very least,
keyring-gitlab-pypiis set-and-forget across multiple projects.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keyring_gitlab_pypi-0.1.tar.gz.
File metadata
- Download URL: keyring_gitlab_pypi-0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b1d10f349a10656f2f70561ae8d5b67ab000ce286b055dfd8b841a5cdbd0400
|
|
| MD5 |
a81a4fe4cd14a8056cf5f789eedc68c6
|
|
| BLAKE2b-256 |
5a467fdd5fb05478c6c089d025ec1984f8f2f7adccceca4e19e2cb24e076538c
|
Provenance
The following attestation bundles were made for keyring_gitlab_pypi-0.1.tar.gz:
Publisher:
python-publish.yml on RazerM/keyring-gitlab-pypi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keyring_gitlab_pypi-0.1.tar.gz -
Subject digest:
0b1d10f349a10656f2f70561ae8d5b67ab000ce286b055dfd8b841a5cdbd0400 - Sigstore transparency entry: 197651980
- Sigstore integration time:
-
Permalink:
RazerM/keyring-gitlab-pypi@7bf6e8f6edcf1bfb49cf6df70a1107fc282ce809 -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/RazerM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7bf6e8f6edcf1bfb49cf6df70a1107fc282ce809 -
Trigger Event:
push
-
Statement type:
File details
Details for the file keyring_gitlab_pypi-0.1-py3-none-any.whl.
File metadata
- Download URL: keyring_gitlab_pypi-0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a7d3bc8bf7ee3b20ed40283afb18696df1fce6bc8b3ad6f90c0906581e81dac
|
|
| MD5 |
b09de36af80e2f003a3d598e091083e2
|
|
| BLAKE2b-256 |
2d5e5060166e2bbdb76e3359cd426c402eb502d0315468c509a48fbc65aa518e
|
Provenance
The following attestation bundles were made for keyring_gitlab_pypi-0.1-py3-none-any.whl:
Publisher:
python-publish.yml on RazerM/keyring-gitlab-pypi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keyring_gitlab_pypi-0.1-py3-none-any.whl -
Subject digest:
3a7d3bc8bf7ee3b20ed40283afb18696df1fce6bc8b3ad6f90c0906581e81dac - Sigstore transparency entry: 197651981
- Sigstore integration time:
-
Permalink:
RazerM/keyring-gitlab-pypi@7bf6e8f6edcf1bfb49cf6df70a1107fc282ce809 -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/RazerM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7bf6e8f6edcf1bfb49cf6df70a1107fc282ce809 -
Trigger Event:
push
-
Statement type: