From da43cab4e341700d3fee4dfab790474084f6d75c Mon Sep 17 00:00:00 2001 From: Gergely Brautigam Date: Wed, 20 Feb 2019 13:00:44 +0100 Subject: [PATCH] Fixed path to be used fully through join and removed unused variable. Signed-off-by: Gergely Brautigam --- _examples/common_test.go | 2 +- plumbing/transport/ssh/auth_method.go | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/_examples/common_test.go b/_examples/common_test.go index aa7c9b446..d7aca096a 100644 --- a/_examples/common_test.go +++ b/_examples/common_test.go @@ -72,7 +72,7 @@ func tempFolder() string { func packageFolder() string { return filepath.Join( build.Default.GOPATH, - "src", "gopkg.in/src-d/go-git.v4", + "src", "gopkg.in", "src-d", "go-git.v4", ) } diff --git a/plumbing/transport/ssh/auth_method.go b/plumbing/transport/ssh/auth_method.go index dbb47c56b..2562b9078 100644 --- a/plumbing/transport/ssh/auth_method.go +++ b/plumbing/transport/ssh/auth_method.go @@ -13,13 +13,11 @@ import ( "gopkg.in/src-d/go-git.v4/plumbing/transport" "github.com/mitchellh/go-homedir" - "github.com/xanzy/ssh-agent" + sshagent "github.com/xanzy/ssh-agent" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/knownhosts" ) -const DefaultUsername = "git" - // AuthMethod is the interface all auth methods for the ssh client // must implement. The clientConfig method returns the ssh client // configuration needed to establish an ssh connection. @@ -271,7 +269,7 @@ func getDefaultKnownHostsFiles() ([]string, error) { } return []string{ - filepath.Join(homeDirPath, "/.ssh/known_hosts"), + filepath.Join(homeDirPath, ".ssh", "known_hosts"), "/etc/ssh/ssh_known_hosts", }, nil }