Keycloak, Git CLI, and GitLab

Hello, does anyone have any advice or recommendations for using Keycloak and handling Git CLI authentication against GitLab?

Use the Device Authorization Flow (OAuth 2.0 Device Authorization Grant), and you may have to write a git credential helper to save the returned token.