-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #293 from buildkite/backport-git-credentials-fix-f…
…rom-secrets-plugin Backport fixes from s3-secrets plugin
- Loading branch information
Showing
2 changed files
with
39 additions
and
16 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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
#!/bin/bash | ||
|
||
ssh-agent -k | ||
if [[ -n "${SSH_AGENT_PID:-}" ]] && ps -p "$SSH_AGENT_PID" &>/dev/null; then | ||
echo "~~~ Stopping ssh-agent ${SSH_AGENT_PID}" | ||
ssh-agent -k | ||
fi | ||
|
||
if [[ -n "${GIT_CREDENTIALS_FILE:-}" ]] ; then | ||
echo "~~~ Cleaning up git credentials" | ||
rm "$GIT_CREDENTIALS_FILE" | ||
fi |