Skip to content

Commit

Permalink
Fixes #1968, #1027 - Fetch-> fatal: could not read Username
Browse files Browse the repository at this point in the history
Uses the core git fetch command instead of a command-line
git fetch so VsCode will prompt the user for their username
and password. Pull & push also use their corresponding core commands.
  • Loading branch information
skylerdawson authored and foxwoods369 committed Feb 20, 2023
1 parent ad407b4 commit 8b2bd18
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Fixes an issue where pinning not being respected in Commit Details view
- Fixes graph issue where search results that are merge commits are not highlighted when the `gitlens.graph.dimMergeCommits` setting is enabled
- Fixes graph issue where rows with tags belonging to a hovered branch are not highlighted when the `gitlens.graph.highlightRowsOnRefHover` setting is enabled
- Fixes [#1968](https://github.com/gitkraken/vscode-gitlens/issues/1968) & [#1027](https://github.com/gitkraken/vscode-gitlens/issues/1027) - Fetch-> fatal: could not read Username - thanks to [PR #2481](https://github.com/gitkraken/vscode-gitlens/pull/2481) by Skyler Dawson ([@foxwoods369](https://github.com/foxwoods369))

## [13.2.0] - 2022-12-20

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,7 @@ A big thanks to the people that have contributed to this project:
- Ash Clarke ([@ashclarke](https://github.com/ashclarke)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=ashclarke)
- Travis Collins ([@TravisTX](https://github.com/TravisTX)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=TravisTX)
- Matt Cooper ([@vtbassmatt](https://github.com/vtbassmatt)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=vtbassmatt)
- Skyler Dawson ([@foxwoods369](https://github.com/foxwoods369)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=foxwoods369)
- Andrii Dieiev ([@IllusionMH](https://github.com/IllusionMH)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=IllusionMH)
- egfx-notifications ([@egfx-notifications](https://github.com/egfx-notifications)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=egfx-notifications)
- Segev Finer ([@segevfiner](https://github.com/segevfiner)) — [contributions](https://github.com/gitkraken/vscode-gitlens/commits?author=segevfiner)
Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ export const enum CoreGitCommands {
Push = 'git.push',
PushForce = 'git.pushForce',
UndoCommit = 'git.undoCommit',
Fetch = 'git.fetch',
}

export const enum CoreGitConfiguration {
Expand Down
6 changes: 5 additions & 1 deletion src/git/models/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,11 @@ export class Repository implements Disposable {
remote?: string;
}) {
try {
await this.container.git.fetch(this.path, options);
if (options?.branch != null) {
await this.container.git.fetch(this.path, options);
} else {
void (await executeCoreGitCommand(CoreGitCommands.Fetch, this.path));
}

this.fireChange(RepositoryChange.Unknown);
} catch (ex) {
Expand Down

0 comments on commit 8b2bd18

Please sign in to comment.