git-ecosystem / git-credential-manager

Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.
Other
6.8k stars 1.78k forks source link

Issues with underscore in login name on Windows #1741

Open ahromis opened 3 days ago

ahromis commented 3 days ago

Version

2.46.2.windows.1

Operating system

Windows

OS version or distribution

Windows 11

Git hosting provider(s)

GitHub Enterprise Server

Other hosting provider

No response

(Azure DevOps only) What format is your remote URL?

None

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

Login with username of name_company and all subsequent git commands should work.

Actual behavior

Git asks for reauthentication when there is an underscore in the username.

The workaround, i.e. to replace ‘_’ in the username with ‘-‘ works. These steps look like:

Logs

No response

mjcheetham commented 2 days ago

Hello! This looks like you're using Enterprise Managed Users with a username in the format user_company.

Does the customer have this setting enabled or not for their enterprise?

Image

Settings > Authentication Security > Single sign-on settings > Automatically redirect users to sign in.

GCM with EMU can have some strange behaviour if this is not enabled.

For additional troubleshooting, they you enable GCM tracing and provide this and we can see what's going on. To enable tracing you can set the GCM_TRACE environment variable to 1.