In the docs

Access tokens

Personal access tokens for git over HTTPS, scripts, CI and agents, limited to what they need.

For agents: this page as Markdown

Make a token under Settings → Account → Access tokens. Making one asks for your password, and the token is shown once: copy it then.

A token is limited three ways:

Choices
Repositories All your repositories, or one
Permissions For each of code, change requests, issues, runs and releases: none, read or write. Creating repositories is its own permission, only for a token over all your repositories.
Expiry 7, 30, 90 or 365 days

Use it as the password for git over HTTPS (any username), or as a bearer token for the API:

curl -H "Authorization: Bearer $LORX_TOKEN" https://git.lorx.space/api/v1/me

A token can renew (same token, same permissions, a new expiry) or be revoked at any time. A token can never do what needs your password again, such as making another token, adding an SSH key, or managing runners: those need you, signed in to the web.