Skip to content

Commit

Permalink
fix(plugins/git): on GitHub it could be already saved
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Jun 24, 2024
1 parent 453fe33 commit 88a6afc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions plugins/git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ prepare() {
log_verbose "Git SSH passphrase set"
fi

if ! ssh-add -L | grep -q "${SSH_PUBLIC_KEY-}"; then
printf "%s" "${SSH_PRIVATE_KEY}" | base64 --decode | ssh-add -
log_verbose "Git SSH key import loaded"
else
log_verbose "Git SSH key import skipped"
fi
printf "%s" "${SSH_PRIVATE_KEY}" | base64 --decode | ssh-add -
log_verbose "Git SSH key import loaded"

git config --local commit.gpgsign true
git config --local user.signingkey "${SSH_PUBLIC_KEY_FILE}"
Expand Down

0 comments on commit 88a6afc

Please sign in to comment.