FIX: don't break the private key when writing it out during theme import
* when importing a private theme using the themes:install rake task the SSH key is written out to a file for use by the git-clone command * if the private key is written out without a newline at end-of-file (i.e. after it's been stripped) it's not recognized as a valid key by SSH * so: don't strip it when writing it out, we should be fine
This commit is contained in:
parent
3f2c0b42fe
commit
74acbad505
|
@ -107,7 +107,7 @@ class ThemeStore::GitImporter
|
||||||
ssh_folder = "#{Pathname.new(Dir.tmpdir).realpath}/discourse_theme_ssh_#{SecureRandom.hex}"
|
ssh_folder = "#{Pathname.new(Dir.tmpdir).realpath}/discourse_theme_ssh_#{SecureRandom.hex}"
|
||||||
FileUtils.mkdir_p ssh_folder
|
FileUtils.mkdir_p ssh_folder
|
||||||
|
|
||||||
File.write("#{ssh_folder}/id_rsa", @private_key.strip)
|
File.write("#{ssh_folder}/id_rsa", @private_key)
|
||||||
FileUtils.chmod(0600, "#{ssh_folder}/id_rsa")
|
FileUtils.chmod(0600, "#{ssh_folder}/id_rsa")
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue