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
acf31c31
Commit
acf31c31
authored
Jun 13, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
communicator/ssh: update logging
parent
310d37db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
communicator/ssh/communicator.go
communicator/ssh/communicator.go
+5
-5
No files found.
communicator/ssh/communicator.go
View file @
acf31c31
...
@@ -240,19 +240,19 @@ func (c *comm) connectToAgent() {
...
@@ -240,19 +240,19 @@ func (c *comm) connectToAgent() {
// open connection to the local agent
// open connection to the local agent
socketLocation
:=
os
.
Getenv
(
"SSH_AUTH_SOCK"
)
socketLocation
:=
os
.
Getenv
(
"SSH_AUTH_SOCK"
)
if
socketLocation
==
""
{
if
socketLocation
==
""
{
log
.
Printf
(
"
no local agent socke
t"
)
log
.
Printf
(
"
[INFO] no local agent socket, will not connect agen
t"
)
return
return
}
}
agentConn
,
err
:=
net
.
Dial
(
"unix"
,
socketLocation
)
agentConn
,
err
:=
net
.
Dial
(
"unix"
,
socketLocation
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"could not connect to local agent socket: %s"
,
socketLocation
)
log
.
Printf
(
"
[ERROR]
could not connect to local agent socket: %s"
,
socketLocation
)
return
return
}
}
// create agent and add in auth
// create agent and add in auth
forwardingAgent
:=
agent
.
NewClient
(
agentConn
)
forwardingAgent
:=
agent
.
NewClient
(
agentConn
)
if
forwardingAgent
==
nil
{
if
forwardingAgent
==
nil
{
log
.
Printf
(
"
c
ould not create agent client"
)
log
.
Printf
(
"
[ERROR] C
ould not create agent client"
)
agentConn
.
Close
()
agentConn
.
Close
()
return
return
}
}
...
@@ -272,11 +272,11 @@ func (c *comm) connectToAgent() {
...
@@ -272,11 +272,11 @@ func (c *comm) connectToAgent() {
err
=
agent
.
RequestAgentForwarding
(
session
)
err
=
agent
.
RequestAgentForwarding
(
session
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"
RequestAgentForwarding:
"
,
err
)
log
.
Printf
(
"
[ERROR] RequestAgentForwarding: %#v
"
,
err
)
return
return
}
}
log
.
Printf
(
"agent forwarding enabled"
)
log
.
Printf
(
"
[INFO]
agent forwarding enabled"
)
return
return
}
}
...
...
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