Gitlab can provides JWT token, for delegating actions.
Docker Registry uses this token, and CI fetch sources with a token.
Tokens use asymetric RSA signature.
openssl x509 -text -noout -in public.pem
Get the public certificate from your Gitlab instance.
Go get a personnal access token /profile/personal_access_tokens
.
Set environments variables.
export GITLAB=gitlab.example.com
export PROJECT=demo/myproject
export TOKEN=my_personal_access_token
export USER=jdoe
python3 -m venv
source ./venv/bin/activate
pip install -r requirements.txt
./demo.py
You can dump the certificate, with the python tool, installed in the venv
cat public.pem | x5092json | jq .
3 terms BSD licences. © 2019 Mathieu Lecarme.