mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Fix problem with read rights on remote build machine
This commit is contained in:
parent
288c5f4c57
commit
a8e5c2d6e4
1 changed files with 6 additions and 2 deletions
|
@ -131,16 +131,20 @@ class RemoteBuildServer(BuildServer):
|
|||
self.ssh_process.wait()
|
||||
|
||||
def download(self, src, dst):
|
||||
# Make sure we can read the file as {user}
|
||||
self._remote_command(['sudo', 'chown', self.username, src])
|
||||
src_arg = '{user}@{host}:{path}'.format(user=self.username, host=self.address, path=src)
|
||||
log_check_call(['scp', '-i', self.keyfile, '-P', str(self.port),
|
||||
src_arg, dst])
|
||||
|
||||
def delete(self, path):
|
||||
self._remote_command(['sudo', 'rm', path])
|
||||
|
||||
def _remote_command(self, command):
|
||||
ssh_cmd = ['ssh', '-i', self.keyfile,
|
||||
'-p', str(self.port),
|
||||
self.username + '@' + self.address,
|
||||
'--',
|
||||
'sudo', 'rm', path]
|
||||
'--'] + command
|
||||
log_check_call(ssh_cmd)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue