forked from msys2/MSYS2-packages
-
Notifications
You must be signed in to change notification settings - Fork 32
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 #40 from mhoyer/patch/broken-ssh-copy-id-script
Fixes git-for-windows/git#2873
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
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,30 @@ | ||
commit d9e727dcc04a52caaac87543ea1d230e9e6b5604 | ||
Author: Oleg <Fallmay@users.noreply.github.com> | ||
Date: Thu Oct 1 12:09:08 2020 +0300 | ||
|
||
Fix `EOF: command not found` error in ssh-copy-id | ||
--- | ||
contrib/ssh-copy-id | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id | ||
index 392f64f9..a7690771 100644 | ||
--- a/contrib/ssh-copy-id | ||
+++ b/contrib/ssh-copy-id | ||
@@ -247,7 +247,7 @@ installkeys_sh() { | ||
# the -z `tail ...` checks for a trailing newline. The echo adds one if was missing | ||
# the cat adds the keys we're getting via STDIN | ||
# and if available restorecon is used to restore the SELinux context | ||
- INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF) | ||
+ INSTALLKEYS_SH=$(tr '\t\n' ' ' <<-EOF | ||
cd; | ||
umask 077; | ||
mkdir -p $(dirname "${AUTH_KEY_FILE}") && | ||
@@ -258,6 +258,7 @@ installkeys_sh() { | ||
restorecon -F .ssh ${AUTH_KEY_FILE}; | ||
fi | ||
EOF | ||
+ ) | ||
|
||
# to defend against quirky remote shells: use 'exec sh -c' to get POSIX; | ||
printf "exec sh -c '%s'" "${INSTALLKEYS_SH}" |