Open ghost opened 9 months ago
similar to #1408
I thought https://github.com/git-ecosystem/git-credential-manager/issues/1426 already support this. My gitea site works with GCM out of the box without any configuration on windows .
Ah, ok.
I'm running it on a sub path "https://example.com/git" and the URL that opens is https://example.com/login/oauth/authorize?..." - So I had to use the mentioned config... (I'm actual on windows, not Linux)
@bohni Could you show your conig?
My -working - config ist
[credential "https://example.org"]
useHttpPath = false
provider = generic
oauthClientId = e90ee53c-94e2-48ac-9358-a874fb9e0662
oauthAuthorizeEndpoint = /git/login/oauth/authorize
oauthTokenEndpoint = /git/login/oauth/access_token
When I remove this section, the URL that opens in the Browser is
https://example.org/login/oauth/authorize?response_type=code&client_id=e90ee53c-94e2-48ac-9358-a874fb9e0662&state=eacb7d86074a4e5397b1855465b78d41&code_challenge_method=S256&code_challenge=r9nb-3HlHYUfMTm2QYItdmXnbO828rRGyF8ktI_w8p4&redirect_uri=http%3a%2f%2f127.0.0.1%3a55150%2f
This URL is missing the required subpath /git
Edit 2024-03-14: I'm running Gitea behind Apache httpd: see Apache HTTPD with a sub-path
03:35:08.057616 ...ricOAuthConfig.cs:38 trace: [TryGet] Invalid OAuth configuration - missing/invalid authorize endpoint:
If your git version is older than 2.41.0, it won't pass the WWW-Authenticate header to the credential helper and therefore won't autodetect Gitea. Either configure endpoints manually or update git executable.
Version
2.4.1
Operating system
Linux
OS version or distribution
Ubuntu 22.04 fresh install
Git hosting provider(s)
Other - please describe below
Other hosting provider
Gitea
(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
Prompt for loging
Actual behavior
Enter basic credentials for 'https://....'
Logs