Fix publickey deployment issue

Qtcreator was unable to create .ssh dir so this will fix it.

Task-number: QTCREATORBUG-22591
Change-Id: I11d6f8e0ccc88ff3bff956edb1912e59ab70092d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Tommi Pekkala
2019-10-10 12:03:59 +03:00
parent ed97d73da8
commit c4aa6d71d9

View File

@@ -68,7 +68,7 @@ void SshKeyDeployer::deployPublicKey(const SshConnectionParameters &sshParams,
connect(&d->deployProcess, &SshRemoteProcessRunner::processClosed,
this, &SshKeyDeployer::handleKeyUploadFinished);
const QString command = "test -d .ssh "
"|| mkdir .ssh && chmod 0700 .ssh && echo '"
"|| mkdir -p ~/.ssh && chmod 0700 .ssh && echo '"
+ QString::fromLocal8Bit(reader.data())
+ "' >> .ssh/authorized_keys && chmod 0600 .ssh/authorized_keys";
d->deployProcess.run(command, sshParams);