Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: languitar/pass-git-helper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.4.1
Choose a base ref
...
head repository: languitar/pass-git-helper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.5.0
Choose a head ref
  • 5 commits
  • 7 files changed
  • 4 contributors

Commits on Apr 24, 2024

  1. Configuration menu
    Copy the full SHA
    04a0dee View commit details
    Browse the repository at this point in the history
  2. Merge pull request #376 from languitar/renovate/black-24.x

    chore(deps): update dependency black to v24.4.1
    languitar authored Apr 24, 2024
    Configuration menu
    Copy the full SHA
    0489e36 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. feat: check if password file exists before running pass

    Currently, `pass-git-helper` doesn't check if a password file exists before
    running `pass`. This leads to authentication failures when the configured
    password store entry (aka `target`) points to a directory instead of a file.
    
    Example:
    
        $ tree -F .password-store
        .password-store/
        └── git/
            ├── github.com.gpg
            └── gitlab.com/
                ├── user1.gpg
                └── user2.gpg
    
    If target is `git/gitlab.com`, `pass-git-helper` will get the following output
    from `pass git/gitlab/com`:
    
        git/gitlab.com
        ├── user1
        └── user2
    
    and will then use the first line (`git/gitlab/com`) as password.
    
    This commit introduces the following changes:
    
    1. To fix the problem described above, `pass-git-helper` first determines the
       `pass` password store directory as:
    
       - the value of `password_store_dir` if defined in `git_pass_mapping.ini` (and
         non-empty)
       - the value of the environment variable `PASSWORD_STORE_DIR` if defined (and
         non-empty)
       - the default: `~/.password-store`
    
       (the latter two correspond to the implementation of `pass`).
       `pass-git-helper` will then check if an actual `<target>.gpg` is present in
       the selected directory (to be clear: only one of the three alternative
       directories gets checked).
    
       The new checks implemented in `pass-git-helper` detect two different error
       cases:
       1. the scenario described above where `target` itself is a directory
       2. a (rather obscure) scenario where `<target>.gpg` is a directory
    
       In both cases, `pass-git-helper` will now exit with an error after presenting
       the user with a (hopefully) useful error message.
    
    2. The value of `password_store_dir` in the ini file may now contain a leading
       `~` (*tilde*) which will get replaced by the users *HOME* (or, on Windows,
       *USERPROFILE*) directory. The change is documented in README.md.
    
    3. New tests for 1. and 2.
    
    Fixes #371
    ktetzlaff committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    b50ca3b View commit details
    Browse the repository at this point in the history
  2. Merge pull request #372 from ktetzlaff/detect-dir-instead-of-or-no-pa…

    …ssword-file
    
    feat: check if password file exists before running `pass`
    languitar authored Apr 25, 2024
    Configuration menu
    Copy the full SHA
    01252c8 View commit details
    Browse the repository at this point in the history
  3. chore(release): 1.5.0 [skip ci]

    # [1.5.0](v1.4.1...v1.5.0) (2024-04-25)
    
    ### Features
    
    * check if password file exists before running `pass` ([b50ca3b](b50ca3b)), closes [#371](#371)
    semantic-release-bot committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    39fc7c1 View commit details
    Browse the repository at this point in the history
Loading