Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Fixed path to be used fully through join and removed unused variable #1069

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _examples/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
}

Expand Down
6 changes: 2 additions & 4 deletions plumbing/transport/ssh/auth_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}
Expand Down