Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ssh known_hosts when accessing native git non-github private repo #131

Closed
sslavic opened this issue Apr 2, 2014 · 0 comments · Fixed by #583
Closed

Use ssh known_hosts when accessing native git non-github private repo #131

sslavic opened this issue Apr 2, 2014 · 0 comments · Fixed by #583

Comments

@sslavic
Copy link

sslavic commented Apr 2, 2014

Readme claims that "Giter8 will use your ssh key to access private repositories, just like git does.". Problem is that it needs to also use known_hosts file (and config file). Otherwise one gets exceptions like:

C:\temp>g8 git@foo.bar.com/template.g8.git
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of fetch command
        at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:138)
        at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:175)
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:121)
        at giter8.Apply$class.clone(apply.scala:80)
        at giter8.Giter8.clone(giter8.scala:3)
        at giter8.Apply$class.inspect(apply.scala:40)
        at giter8.Giter8.inspect(giter8.scala:3)
        at giter8.Giter8$$anonfun$2.apply(giter8.scala:19)
        at giter8.Giter8$$anonfun$2.apply(giter8.scala:18)
        at scala.Option.map(Option.scala:133)
        at giter8.Giter8.run(giter8.scala:18)
        at giter8.Giter8.run(giter8.scala:10)
        at giter8.Giter8.run(giter8.scala:3)
        at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:57)
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:77)
        at xsbt.boot.Launch$.run(Launch.scala:57)
        at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
        at xsbt.boot.Launch$.launch(Launch.scala:65)
        at xsbt.boot.Launch$.apply(Launch.scala:16)
        at xsbt.boot.Boot$.runImpl(Boot.scala:32)
        at xsbt.boot.Boot$.main(Boot.scala:21)
        at xsbt.boot.Boot.main(Boot.scala)
Caused by: org.eclipse.jgit.errors.TransportException: git@foo.bar.com/template.g8.git: UnknownHostKey: foo.bar.com.
RSA key fingerprint is 10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10
        at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:141)
        at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
        at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
        at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
        at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127)
        at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
        at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1062)
        at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:129)
        ... 21 more
Caused by: com.jcraft.jsch.JSchException: UnknownHostKey: foo.bar.com. RSA
key fingerprint is 10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10
        at com.jcraft.jsch.Session.checkHost(Session.java:718)
        at com.jcraft.jsch.Session.connect(Session.java:313)
        at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
        ... 28 more
Error during sbt execution: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of fetch command

I have the key, private and pub, as well as known_hosts and config file in .ssh directory within my home directory, but giter8 is not using them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant