-
-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiple GitHub SSH deploy keys (#568)
* add sshPublicKeysDirectoryPath and GIT_CONFIG_EXTENSIONS parameters that adds git configs and mounts .ssh/config and public keys to the container, in order to allow multiple sh deploy key trick by webplatform@ssh-agent * remove sshPublicKeysDirectoryPath and GIT_CONFIG_EXTENSIONS from windows runner for now
- Loading branch information
Showing
8 changed files
with
67 additions
and
5 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -z "${GIT_CONFIG_EXTENSIONS}" ] | ||
then | ||
echo "GIT_CONFIG_EXTENSIONS unset skipping" | ||
else | ||
echo "GIT_CONFIG_EXTENSIONS is set configuring extra git configs" | ||
|
||
IFS=$'\n' | ||
for config in $(echo "${GIT_CONFIG_EXTENSIONS}" | sed 's/\(.*\)=\(.*\)/"\1" "\2"/g'); do | ||
if [[ $config =~ \"([^\"]+)\"\ \"([^\"]+)\" ]]; then | ||
key="${BASH_REMATCH[1]}" | ||
value="${BASH_REMATCH[2]}" | ||
else | ||
echo "Error parsing config: $config" | ||
exit 1 | ||
fi | ||
echo "Adding extra git config: \"$key\" = \"$value\"" | ||
git config --global --add "$key" "$value" | ||
done | ||
unset IFS | ||
|
||
fi | ||
|
||
echo "---------- git config --list -------------" | ||
git config --list | ||
|
||
echo "---------- git config --list --show-origin -------------" | ||
git config --list --show-origin |
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
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