Add multi-platform git credential management

- Add git-credential-oauth package for OAuth authentication
- Configure OAuth helpers for GitHub, GitLab, BitBucket
- Add token-based authentication for Overleaf
- Remove disabled credential helper configuration
- Support secure browser-based OAuth flows and token storage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Yan Lin 2025-07-28 13:50:46 +02:00
parent c91921a125
commit ea6c7c815b
2 changed files with 16 additions and 1 deletions

View file

@ -1,6 +1,10 @@
{ config, pkgs, ... }:
{
# Enable git-credential-oauth for GitHub, GitLab, BitBucket
programs.git-credential-oauth = {
enable = true;
};
programs.git = {
enable = true;
@ -79,7 +83,17 @@
];
extraConfig = {
credential.helper = "";
# Platform-specific credential configuration
credential = {
# OAuth platforms (handled by git-credential-oauth)
"https://github.com".helper = "oauth";
"https://gitlab.com".helper = "oauth";
"https://bitbucket.org".helper = "oauth";
# Token-based platforms
"https://git.overleaf.com".helper = "store";
"https://git.overleaf.com".username = "git";
};
core = {
editor = "nvim";