Cannot set user for juju scp

Bug #1387766 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Medium
Andrew Wilkins

Bug Description

The scp command uses a user@hostname format to allow the user to be specified, as does ssh.

The juju versions of these commands do not accept this format:

$ juju scp buildvars.json jenkins@jenkins/0:
ERROR exit status 1 (cp: cannot create regular file ‘ubuntu@jennkins@jenkins/0:’: No such file or directory)

With ssh, the -l parameter can be used instead, but scp does not accept -l. scp accepts -o, but only before the file list, and "juju scp" interprets -o before the file list as a "juju scp" option, not an "scp" option:

$ juju scp -o User=jenkins buildvars.json jenkins/0:
error: flag provided but not defined: -o

This invocation is accepted:
$ juju scp -- -o User=jenkins buildvars.json jenkins/0:

But the user is still set to "ubuntu", even though normal scp honours "-o User=jenkins". It is also counter-intuitive, because -- should mean that juju passes "jenkins/0:" to scp verbatim.

Aaron Bentley (abentley)
summary: - Cannot set user for juju scp
+ Extremely hard to set user for juju scp
description: updated
Changed in juju-core:
importance: Medium → Low
Aaron Bentley (abentley)
description: updated
Changed in juju-core:
importance: Low → Medium
description: updated
summary: - Extremely hard to set user for juju scp
+ Cannot set user for juju scp
Revision history for this message
Ian Booth (wallyworld) wrote :

Bug 1387640 should also be fixed at the same time as this one.

Ian Booth (wallyworld)
Changed in juju-core:
milestone: none → 1.21
Andrew Wilkins (axwalk)
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Andrew Wilkins (axwalk)
Ian Booth (wallyworld)
Changed in juju-core:
milestone: 1.21 → 1.21-alpha3
Andrew Wilkins (axwalk)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.