Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnome-keyring-yubikey-unlock
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
gnome-keyring-yubikey-unlock
Commits
32561916
There was an error fetching the commit references. Please try again later.
Unverified
Commit
32561916
authored
3 years ago
by
Sebastian Wieland
Browse files
Options
Downloads
Patches
Plain Diff
Automatic pinentry
parent
625bf322
No related branches found
No related tags found
1 merge request
!1
Automatic pinentry
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+8
-0
8 additions, 0 deletions
README.md
unlock_keyrings.sh
+8
-2
8 additions, 2 deletions
unlock_keyrings.sh
with
16 additions
and
2 deletions
README.md
+
8
−
0
View file @
32561916
...
...
@@ -63,6 +63,14 @@ Then, add the following command to gnome-autostart. You should know how to auto-
/path/to/this/project/unlock_keyrings.sh /path/to/your_secret
```
Optionally, if you don't want to enter your GPG smartcard pin every time you log in, add it as parameter to the command. If your pin is e.g. 123456:
```
/path/to/this/project/unlock_keyrings.sh /path/to/your_secret 123456
```
This obviously weakens the security of the private key, so obviously only do this if you're comfortable with having your pin stored on your disk in plain text.
You're all set! Re-login and have a try!
## FAQ
...
...
This diff is collapsed.
Click to expand it.
unlock_keyrings.sh
+
8
−
2
View file @
32561916
...
...
@@ -3,8 +3,9 @@
_self_bin_name
=
"
$0
"
secret_file
=
"
$1
"
smartcard_pin
=
"
$2
"
[[
"
$secret_file
"
=
''
]]
&&
echo
"Usage:
$0
<secret_file>"
&&
exit
1
[[
"
$secret_file
"
=
''
]]
&&
echo
"Usage:
$0
<secret_file>
[<smartcard pin>]
"
&&
exit
1
function
where_is_him
()
{
SOURCE
=
"
$1
"
...
...
@@ -22,8 +23,13 @@ function where_am_i () {
[[
"
$_my_path
"
=
""
]]
&&
where_is_him
"
$_self_bin_name
"
||
where_is_him
"
$_my_path
"
}
gpg_options
=()
if
[[
!
"
$smartcard_pin
"
=
''
]]
;
then
gpg_options
=(
"--pinentry-mode"
"loopback"
"--passphrase"
"
$smartcard_pin
"
)
fi
cd
`
where_am_i
`
&&
gpg
--decrypt
"
$secret_file
"
| bin/unlock_keyrings
--secret-file
-
--quiet
gpg
"
${
gpg_options
[@]
}
"
--decrypt
"
$secret_file
"
| bin/unlock_keyrings
--secret-file
-
--quiet
exit
$?
...
...
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