Skip to content

Commit

Permalink
Add Windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
steinybot committed Apr 17, 2020
1 parent 90e5977 commit 35f4296
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli-git/src/main/scala/SshAgentSessionFactory.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ import org.eclipse.jgit.util.FS

class SshAgentSessionFactory(knownHosts: Option[String]) extends JschConfigSessionFactory() {

private val Home = Option(System.getProperty("user.home")).getOrElse("")
private val Home = Option(System.getProperty("user.home")).getOrElse("")
private val ProgramData = Option(System.getenv("PROGRAMDATA")).getOrElse("")

private val KnownHostsPaths: List[String] = List(
s"$Home/.ssh/known_hosts",
"/etc/ssh/ssh_known_hosts"
"/etc/ssh/ssh_known_hosts",
s"$ProgramData/ssh/ssh_known_hosts"
)

override protected def configure(host: OpenSshConfig.Host, session: Session): Unit = {}
Expand Down

0 comments on commit 35f4296

Please sign in to comment.