forked from webpro/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helper scripts to make Git GPG signing work in Codespaces
- Loading branch information
Showing
4 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# Source: https://github.com/MikeMcQuaid/dotfiles | ||
# Use the right credential helper on Codespaces/macOS/Linux | ||
set -e | ||
|
||
if [[ "$CODESPACES" == "true" ]] | ||
then | ||
/.codespaces/bin/gitcredential_github.sh "$@" | ||
elif [[ "$(uname -s)" == "Darwin" ]] | ||
then | ||
git credential-osxkeychain "$@" | ||
else | ||
git credential-cache "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
# Source: https://github.com/MikeMcQuaid/dotfiles | ||
# Use the right GPG helper on Codespaces | ||
set -e | ||
|
||
if [[ "$CODESPACES" == "true" ]] | ||
then | ||
/.codespaces/bin/gh-gpgsign "$@" | ||
else | ||
gpg "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
[user] | ||
name = Lukas Spieß | ||
email = [email protected] | ||
signingkey = 9C9B7EC4E32DDDE12135366518488BCD4C52C648 | ||
|
||
[includeIf "gitdir/i:~/Developer/Work/"] | ||
path = ./work/config | ||
|
@@ -17,6 +16,10 @@ | |
autocrlf = input | ||
trustctime = false | ||
|
||
[credential] | ||
# Use custom dotfiles credentials helper. | ||
helper = dotfiles | ||
|
||
[init] | ||
defaultBranch = main | ||
templatedir = ~/.config/git/template | ||
|
@@ -28,7 +31,8 @@ | |
gpgsign = true | ||
|
||
[gpg] | ||
program = gpg | ||
# Use custom dotfiles GPG helper that automatically handles GitHub Codespaces. | ||
program = git-gpg-dotfiles | ||
|
||
[fetch] | ||
prune = true | ||
|