Skip to content

Commit 96af267

Browse files
Revert "Disable interactive git credential prompts on fetch operations (#16)" (#18)
This reverts commit 2fa5c83.
1 parent 2fa5c83 commit 96af267

9 files changed

Lines changed: 4 additions & 68 deletions

File tree

.goreleaser.stable.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,29 +97,24 @@ changelog:
9797
- title: Other
9898
order: 999
9999

100-
homebrew_casks:
100+
brews:
101101
- name: git-rain
102102
repository:
103103
owner: git-fire
104104
name: homebrew-tap
105105
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
106106
pull_request:
107107
enabled: false
108+
directory: Formula
108109
commit_author:
109110
name: goreleaserbot
110111
email: bot@goreleaser.com
111112
commit_msg_template: "chore: update git-rain to {{ .Tag }}"
112113
homepage: "https://github.com/git-fire/git-rain"
113114
description: "Sync local git repositories from their remotes — the reverse of git-fire"
114115
license: MIT
115-
binaries:
116-
- git-rain
117-
hooks:
118-
post:
119-
install: |
120-
if OS.mac?
121-
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/git-rain"]
122-
end
116+
install: bin.install "git-rain"
117+
test: system "#{bin}/git-rain", "--version"
123118

124119
release:
125120
github:

cmd/root.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,6 @@ func fetchOnly(repoPath string, opts git.RainOptions) error {
888888
}
889889
cmd := exec.Command("git", fetchArgs...)
890890
cmd.Dir = repoPath
891-
git.PrepareNetworkGit(cmd)
892891
if out, err := cmd.CombinedOutput(); err != nil {
893892
return fmt.Errorf("%s: %w (output: %s)", strings.Join(append([]string{"git"}, fetchArgs...), " "), err, strings.TrimSpace(string(out)))
894893
}

cmd/root_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ func TestFetchFailureMessage(t *testing.T) {
487487
{"authentication", "Authentication failed for git@github.com", "could not authenticate with remote — check your credentials and try again"},
488488
{"permission denied", "git@github.com: Permission denied (publickey)", "could not authenticate with remote — check your credentials and try again"},
489489
{"could not read", "fatal: could not read from remote", "could not authenticate with remote — check your credentials and try again"},
490-
{"terminal prompts disabled", "fatal: could not read Username for 'https://github.com': terminal prompts disabled", "could not authenticate with remote — check your credentials and try again"},
491490
{"401", "fatal: HTTP 401: Unauthorized", "could not authenticate with remote — check your credentials and try again"},
492491
{"403", "fatal: HTTP 403 forbidden", "could not authenticate with remote — check your credentials and try again"},
493492
{"could not resolve", "fatal: unable to access ...: Could not resolve host", "could not reach remote — check your network and try again"},

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ require (
66
github.com/charmbracelet/bubbles v1.0.0
77
github.com/charmbracelet/bubbletea v1.3.10
88
github.com/charmbracelet/lipgloss v1.1.0
9-
github.com/git-fire/git-harness v0.3.1
109
github.com/git-fire/git-testkit v0.2.0
1110
github.com/gofrs/flock v0.12.1
1211
github.com/mattn/go-runewidth v0.0.19

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
2929
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
3030
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
3131
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
32-
github.com/git-fire/git-harness v0.3.1 h1:+fCQ9nMS3YI7r9iVGrU95oefH8N86XjxcYSqsin/1aE=
33-
github.com/git-fire/git-harness v0.3.1/go.mod h1:cNvjYdbowpoO/KdJwtGenhySx+EkgoQJujuANJpRpj4=
3432
github.com/git-fire/git-testkit v0.2.0 h1:IFzOxMdNTE5A4lnzbFz62h2R44+3qVy27Xj1KWyGi1Y=
3533
github.com/git-fire/git-testkit v0.2.0/go.mod h1:YlJlkY9JfGdYTe9o9W3l+gv9BPj05FGu6HK36Z5jwVA=
3634
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=

internal/git/command.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

internal/git/command_test.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

internal/git/fetch_mainline.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ func MainlineFetchRemotes(repoPath string, opts RainOptions) (RainResult, error)
146146
}
147147
cmd := exec.Command("git", args...)
148148
cmd.Dir = repoPath
149-
PrepareNetworkGit(cmd)
150149
if output, err := cmd.CombinedOutput(); err != nil {
151150
failedReason[remote] = fetchFailureReason(output)
152151
}

internal/git/rain.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ func RainRepository(repoPath string, opts RainOptions) (RainResult, error) {
201201
}
202202
cmd := exec.Command("git", fetchArgs...)
203203
cmd.Dir = repoPath
204-
PrepareNetworkGit(cmd)
205204
if output, fetchErr := cmd.CombinedOutput(); fetchErr != nil {
206205
// Freeze gracefully — could not reach remote (auth, network, etc.).
207206
// This is not a hard failure; the repo is untouched. Try again later.

0 commit comments

Comments
 (0)