Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
ee6fd494
Commit
ee6fd494
authored
Jul 07, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
communicator/ssh: show more descriptive error if SCP not avail [GH-127]
parent
5ba5834a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
CHANGELOG.md
CHANGELOG.md
+2
-0
communicator/ssh/communicator.go
communicator/ssh/communicator.go
+9
-0
No files found.
CHANGELOG.md
View file @
ee6fd494
...
...
@@ -9,6 +9,8 @@ FEATURES:
IMPROVEMENTS:
*
core: If SCP is not available, a more descriptive error message
is shown telling the user. [GH-127]
*
virtualbox: Delete the packer-made SSH port forwarding prior to
exporting the VM.
...
...
communicator/ssh/communicator.go
View file @
ee6fd494
...
...
@@ -3,6 +3,7 @@ package ssh
import
(
"bytes"
"code.google.com/p/go.crypto/ssh"
"errors"
"fmt"
"github.com/mitchellh/packer/packer"
"io"
...
...
@@ -145,6 +146,14 @@ func (c *comm) Upload(path string, input io.Reader) error {
// Otherwise, we have an ExitErorr, meaning we can just read
// the exit status
log
.
Printf
(
"non-zero exit status: %d"
,
exitErr
.
ExitStatus
())
// If we exited with status 127, it means SCP isn't available.
// Return a more descriptive error for that.
if
exitErr
.
ExitStatus
()
==
127
{
return
errors
.
New
(
"SCP failed to start. This usually means that SCP is not
\n
"
+
"properly installed on the remote system."
)
}
}
return
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment