diff options
Diffstat (limited to 'src/lib/Gitolite/Setup.pm')
-rw-r--r-- | src/lib/Gitolite/Setup.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/Gitolite/Setup.pm b/src/lib/Gitolite/Setup.pm index 8ad5d34..69a9be0 100644 --- a/src/lib/Gitolite/Setup.pm +++ b/src/lib/Gitolite/Setup.pm @@ -92,7 +92,8 @@ sub args { if ($pubkey) { $pubkey =~ /\.pub$/ or _die "'$pubkey' name does not end in .pub"; tsh_try("cat $pubkey") or _die "'$pubkey' not a readable file"; - tsh_lines() == 1 or _die "'$pubkey' must have exactly one line"; + my @lines = grep {!/^(#|$)/} tsh_lines(); + scalar(@lines) == 1 or _die "'$pubkey' must have exactly one non-empty, non-comment line"; tsh_try("ssh-keygen -l -f $pubkey") or _die "'$pubkey' does not seem to be a valid ssh pubkey file"; $admin = $pubkey; |