Skip to content

No longer require magic username for Git over HTTPS with OAuth token

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

Previously, the magic username 'oauth2' was required to access Git over HTTPS with an OAuth access token. This caused problems for Git users with a different username in the remote URL or config key credential.username.

Relaxing the requirement makes it easy to store OAuth access tokens for multiple accounts with git-credential.

This behaviour is consistent with personal access tokens.

Fixes #349461

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by M Hickford

Merge request reports