timvisee / prs

🔐 A secure, fast & convenient password manager CLI using GPG and git to sync.
https://gitlab.com/timvisee/prs
GNU General Public License v3.0
211 stars 8 forks source link

Sign git commits #10

Closed kaspar030 closed 2 years ago

kaspar030 commented 2 years ago

"pass" allows signing of the git commits. (pass.signcommits=true)

We use github's branch protection to enforce that.

It would be great if prs would support this, too!

timvisee commented 2 years ago

I assume you're talking about GPG signing.

prs basically invokes the git command when doing operations, meaning you can use gits configuration to achieve this.

Simply prefix your git commands with prs to invoke it's commands within your password store.

# Enable signing in local git config in password store
prs git config commit.gpgsign true

# Commit and push to share configuration (add to .gitignore if you don't want to share)
prs git status
prs git add .
prs git commit
prs git push

Does this suffice?

kaspar030 commented 2 years ago

Could've thought of that. Thanks a lot!