Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gpg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dotfiles
gpg
Commits
78b8ef40
Commit
78b8ef40
authored
2 years ago
by
Henrik Tjäder
Browse files
Options
Downloads
Patches
Plain Diff
Added indirection, dependent on setting USE_TTY env
parent
267159ab
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gnupg/gpg-agent.conf
+2
-1
2 additions, 1 deletion
.gnupg/gpg-agent.conf
.gnupg/pinentry-auto.sh
+38
-0
38 additions, 0 deletions
.gnupg/pinentry-auto.sh
with
40 additions
and
1 deletion
.gnupg/gpg-agent.conf
+
2
−
1
View file @
78b8ef40
default
-
cache
-
ttl
3600
max
-
cache
-
ttl
7200
enable
-
ssh
-
support
pinentry
-
program
/
usr
/
bin
/
pinentry
-
tty
# pinentry-program /usr/bin/pinentry-tty
pinentry
-
program
pinentry
-
auto
# 3 Hours cache on SSH-keys
default
-
cache
-
ttl
-
ssh
10800
...
...
This diff is collapsed.
Click to expand it.
.gnupg/pinentry-auto.sh
0 → 100644
+
38
−
0
View file @
78b8ef40
#!/bin/sh
# Choose between pinentry-tty and pinentry-x11 based on whether
# $PINENTRY_USER_DATA contains USE_TTY=1
#
# Based on:
# https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
#
# Note: Environment detection is difficult.
# - stdin is Assuan pipe, preventing tty checking
# - configuration info (e.g. ttyname) is passed via Assuan pipe, preventing
# parsing or fallback without implementing Assuan protocol.
# - environment is sanitized by atfork_cb in call-pinentry.c (removing $GPG_TTY)
#
# $PINENTRY_USER_DATA is preserved since 2.08 https://dev.gnupg.org/T799
#
# Format of $PINENTRY_USER_DATA not specified (that I can find), pinentry-mac
# assumes comma-separated sequence of NAME=VALUE with no escaping mechanism
# https://github.com/GPGTools/pinentry-mac/blob/v0.9.4/Source/AppDelegate.m#L78
# and recognizes USE_CURSES=1 for curses fallback
# https://github.com/GPGTools/pinentry-mac/pull/2
#
# To the extent possible under law, Kevin Locke <kevin@kevinlocke.name> has
# waived all copyright and related or neighboring rights to this work
# under the terms of CC0: https://creativecommons.org/publicdomain/zero/1.0/
set
-Ceu
# Use pinentry-tty if $PINENTRY_USER_DATA contains USE_TTY=1
case
"
${
PINENTRY_USER_DATA
-
}
"
in
*
USE_TTY
=
1
*
)
# Note: Change to pinentry-curses if a Curses UI is preferred.
exec
pinentry-tty
"
$@
"
;;
esac
# Otherwise, use any UI (configured by Debian Alternatives System)
# Note: Will fall back to curses if $DISPLAY is not available.
exec
pinentry-qt
"
$@
"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment