git: switch to git-credential-oauth

This commit is contained in:
Erwin Boskma 2024-04-04 16:41:46 +02:00
parent 78121263ca
commit 02ba6aaf29
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk

View file

@ -85,23 +85,20 @@ in
}; };
extraConfig = { extraConfig = {
# credential.helper = "${config.programs.git.package.override {withLibsecret = true;}}/bin/git-credential-libsecret";
credential = { credential = {
helper = "${pkgs.git-credential-manager}/bin/git-credential-manager"; helper = [
credentialStore = "secretservice"; "cache --timeout 7200"
"${pkgs.git-credential-oauth}/bin/git-credential-oauth"
];
"https://dev.azure.com" = { "https://dev.azure.com" = {
useHttpPath = true; useHttpPath = true;
}; };
"https://git.datarift.nl" = { "https://git.datarift.nl" = {
provider = "generic"; oauthClientId = "a4792ccc-144e-407e-86c9-5e7d8d9c3269";
oauthClientId = "3ae2eee7-1c52-4950-846e-17de716cfe77"; oauthAuthURL = "/login/oauth/authorize";
oauthClientSecret = "gto_tgalquoafnphcly4meztaxnfb3p2sq2aajksp7a2d4iu66c3ro2a"; oauthTokenURL = "/login/oauth/access_token";
oauthRedirectUri = "http://127.0.0.1:42069/";
oauthAuthorizeEndpoint = "/login/oauth/authorize";
oauthTokenEndpoint = "/login/oauth/access_token";
oauthScopes = "read:user repo";
}; };
}; };
init = { init = {
@ -184,9 +181,6 @@ in
}; };
}; };
home.packages = [ home.packages = [ pkgs.gitu ];
pkgs.git-credential-manager
pkgs.gitu
];
}; };
} }