Skip to content

Commit 317b245

Browse files
author
Stephan Dilly
authored
fix credential.helper config usage inside repo (#1091)
1 parent 9653545 commit 317b245

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2828
- support adding annotations to tags ([#747](https://github.com/extrawurst/gitui/issues/747))
2929
- support inspecting annotation of tag ([#1076](https://github.com/extrawurst/gitui/issues/1076))
3030
- support deleting tag on remote ([#1074](https://github.com/extrawurst/gitui/issues/1074))
31+
- support git credentials helper (https) ([#800](https://github.com/extrawurst/gitui/issues/800))
3132

3233
### Fixed
3334
- Keep commit message when pre-commit hook fails ([#1035](https://github.com/extrawurst/gitui/issues/1035))

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ These are the high level goals before calling out `1.0`:
8585

8686
- no support for GPG signing (see [#97](https://github.com/extrawurst/gitui/issues/97))
8787
- no git-lfs support (see [#1089](https://github.com/extrawurst/gitui/discussions/1089))
88+
- *credential.helper* for https needs to be **explicitly** configured (see [#800](https://github.com/extrawurst/gitui/issues/800)
8889

8990
Currently, this tool does not fully substitute the _git shell_, however both tools work well in tandem.
9091

asyncgit/src/sync/cred.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use super::{
44
remotes::get_default_remote_in_repo, repository::repo, RepoPath,
55
};
66
use crate::error::{Error, Result};
7-
use git2::{Config, CredentialHelper};
7+
use git2::CredentialHelper;
88

99
/// basic Authentication Credentials
1010
#[derive(Debug, Clone, Default, PartialEq)]
@@ -59,9 +59,10 @@ pub fn extract_username_password(
5959
//if the username is in the url we need to set it here,
6060
//I dont think `config` will pick it up
6161

62-
if let Ok(config) = Config::open_default() {
62+
if let Ok(config) = repo.config() {
6363
helper.config(&config);
6464
}
65+
6566
Ok(match helper.execute() {
6667
Some((username, password)) => {
6768
BasicAuthCredential::new(Some(username), Some(password))

0 commit comments

Comments
 (0)