-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Adding support to ssh-agent on Windows using named pipes (#733)
- Loading branch information
1 parent
e0b5adc
commit 3177287
Showing
13 changed files
with
1,203 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build !windows | ||
// +build !windows | ||
|
||
package ssh | ||
|
||
import ( | ||
"net" | ||
) | ||
|
||
func dialSSHAgentConnection(sock string) (agentConn net.Conn, error error) { | ||
return net.Dial("unix", sock) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package ssh | ||
|
||
import ( | ||
"net" | ||
"strings" | ||
|
||
"gopkg.in/natefinch/npipe.v2" | ||
) | ||
|
||
func dialSSHAgentConnection(sock string) (agentConn net.Conn, error error) { | ||
if strings.Contains(sock, "\\pipe\\") { | ||
agentConn, error = npipe.Dial(sock) | ||
} else { | ||
agentConn, error = net.Dial("unix", sock) | ||
} | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.