Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gopass-git-credentials: rename to git-credential-gopass #1670

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ builds:
- 6
- 7
mod_timestamp: '{{ .CommitTimestamp }}'
- id: gopass-git-credentials
dir: cmd/gopass-git-credentials
binary: gopass-git-credentials
- id: git-credential-gopass
dir: cmd/git-credential-gopass
binary: git-credential-gopass
flags:
- -trimpath
- -tags=netgo
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export GO111MODULE=on
OK := $(shell tput setaf 6; echo ' [OK]'; tput sgr0;)

all: build completion
build: $(GOPASS_OUTPUT) gopass-git-credentials gopass-hibp gopass-jsonapi gopass-summon-provider
build: $(GOPASS_OUTPUT) git-credential-gopass gopass-hibp gopass-jsonapi gopass-summon-provider
completion: $(BASH_COMPLETION_OUTPUT) $(FISH_COMPLETION_OUTPUT) $(ZSH_COMPLETION_OUTPUT)
travis: sysinfo crosscompile build install fulltest codequality completion full
travis-osx: sysinfo build install test completion full
Expand Down Expand Up @@ -75,9 +75,9 @@ $(GOPASS_OUTPUT): $(GOFILES_BUILD)
@$(GO) build -o $@ $(BUILDFLAGS)
@printf '%s\n' '$(OK)'

gopass-git-credentials: $(GOFILES_BUILD)
git-credential-gopass: $(GOFILES_BUILD)
@echo -n ">> BUILD, version = $(GOPASS_VERSION)/$(GOPASS_REVISION), output = $@"
@cd cmd/gopass-git-credentials && $(GO) build -o gopass-git-credentials $(BUILDFLAGS)
@cd cmd/git-credential-gopass && $(GO) build -o git-credential-gopass $(BUILDFLAGS)
@printf '%s\n' '$(OK)'

gopass-hibp: $(GOFILES_BUILD)
Expand All @@ -99,7 +99,7 @@ install: all install-completion
@echo -n ">> INSTALL, version = $(GOPASS_VERSION)"
@install -m 0755 -d $(DESTDIR)$(BINDIR)
@install -m 0755 $(GOPASS_OUTPUT) $(DESTDIR)$(BINDIR)/gopass
@install -m 0755 cmd/gopass-git-credentials/gopass-git-credentials $(DESTDIR)$(BINDIR)/gopass-git-credentials
@install -m 0755 cmd/git-credential-gopass/git-credential-gopass $(DESTDIR)$(BINDIR)/git-credential-gopass
@install -m 0755 cmd/gopass-hibp/gopass-hibp $(DESTDIR)$(BINDIR)/gopass-hibp
@install -m 0755 cmd/gopass-jsonapi/gopass-jsonapi $(DESTDIR)$(BINDIR)/gopass-jsonapi
@install -m 0755 cmd/gopass-summon-provider/gopass-summon-provider $(DESTDIR)$(BINDIR)/gopass-summon-provider
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ gopass is developed in the open. Here are some of the channels we use to communi
- [gopassbridge](https://github.com/gopasspw/gopassbridge): Browser plugin for Firefox, Chrome and other Chromium based browsers
- [kubectl gopass](https://github.com/gopasspw/kubectl-gopass): Kubernetes / kubectl plugin to support reading and writing secrets directly from/to gopass.
- [gopass alfred](https://github.com/gopasspw/gopass-alfred): Alfred workflow to use gopass from the Alfred Mac launcher
- [`gopass-git-credentials`](https://github.com/gopasspw/gopass/tree/master/cmd/gopass-git-credentials): Integrate gopass as an git-credential helper
- [`git-credential-gopass`](https://github.com/gopasspw/gopass/tree/master/cmd/git-credential-gopass): Integrate gopass as an git-credential helper
- [`gopass-hibp`](https://github.com/gopasspw/gopass/tree/master/cmd/gopass-hibp): haveibeenpwned.com leak checker
- [`gopass-jsonapi`](https://github.com/gopasspw/gopass/tree/master/cmd/gopass-jsonapi): native messaging for browser plugins, e.g. gopassbridge
- [`terraform-provider-gopass`](https://github.com/camptocamp/terraform-provider-pass): a Terraform provider to interact with gopass
Expand Down
1 change: 1 addition & 0 deletions cmd/git-credential-gopass/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git-credential-gopass
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (s *gc) Configure(c *cli.Context) error {
if flags == 0 {
log.Println("No target given, assuming --global.")
}
cmd := exec.CommandContext(ctx, "git", "config", flag, "credential.helper", `"!gopass-git-credentials $@"`)
cmd := exec.CommandContext(ctx, "git", "config", flag, "credential.helper", "gopass")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this configure the gopass binary itself as the git credential helper?

cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

const (
name = "gopass-git-credentials"
name = "git-credential-gopass"
)

var (
Expand Down Expand Up @@ -59,10 +59,10 @@ func main() {
app := cli.NewApp()
app.Name = name
app.Version = version
app.Usage = `Use "!gopass-git-credentials $@" as git's credential.helper`
app.Usage = `Use "gopass" as git's credential.helper`
app.Description = "" +
"This command allows you to cache your git-credentials with gopass." +
"Activate by using `git config --global credential.helper \"!gopass-git-credentials $@\"`"
"Activate by using `git config --global credential.helper gopass"
app.EnableBashCompletion = true
app.Commands = []*cli.Command{
{
Expand All @@ -85,7 +85,7 @@ func main() {
},
{
Name: "configure",
Description: "This command configures gopass-git-credential as git's credential.helper",
Description: "This command configures git-credential-gopass as git's credential.helper",
Action: gc.Configure,
Flags: []cli.Flag{
&cli.BoolFlag{
Expand Down
1 change: 0 additions & 1 deletion cmd/gopass-git-credentials/.gitignore

This file was deleted.