Skip to content

Do not create commits during setup with specified remote #2901

Closed

Description

@sewnie

Summary

When running gopass setup and supplying a remote, gopass by itself makes two commits, which makes the upstream remote's history conflict with the ones gopass made.

Steps To Reproduce

  1. gopass setup with a remote WITH history
  2. Observe as gopass fails to setup
❓ Do you want to add a git remote? [y/N/q]: y
Configuring the git remote ...
Please enter the git remote for your shared store [[REDACTED]]: 
2024/06/22 17:14:35 failed to setup git remote: failed to push to git remote: exit status 1: To [REDACTED]
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to [REDACTED]
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Expected behavior

gopass doesn't make conflicting history.

Activity

  1. dominikschulz commented on Sep 20, 2025

    @dominikschulz
    Member

    Yes, when we add a remote we should first try to clone the remote before me make any commits.

  2. added a commit that references this issue on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugDefects

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址