Skip to content

Commit 57f1cc6

Browse files
author
root
committed
Fix #305
1 parent 15fe708 commit 57f1cc6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: lib/redmine_gitolite/gitolite_modules/mirroring.rb

+6
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,23 @@ def mirroring_keys_installed?(opts = {})
7474

7575
def install_private_key
7676
sudo_install_file(File.read(gitolite_ssh_private_key), gitolite_ssh_private_key_dest_path, '600')
77+
rescue
78+
false
7779
end
7880

7981

8082
def install_public_key
8183
sudo_install_file(File.read(gitolite_ssh_public_key), gitolite_ssh_public_key_dest_path, '644')
84+
rescue
85+
false
8286
end
8387

8488

8589
def install_mirroring_script
8690
command = ['#!/bin/sh', "\n", 'exec', 'ssh', '-T', '-o', 'BatchMode=yes', '-o', 'StrictHostKeyChecking=no', '-i', gitolite_ssh_private_key_dest_path, '"$@"', "\n"].join(' ')
8791
sudo_install_file(command, gitolite_mirroring_script_dest_path, '700')
92+
rescue
93+
false
8894
end
8995

9096
end

0 commit comments

Comments
 (0)