Grgit clone repository exception

I am very new to use gradle I am cloning a repository using gradle but it gives me exception as attached in the picture when I tace it by using stacktrace and also it always prompt this message "The authenticity of host “myhost” cant be established RSA key finger print “a4:assssfdfadfa—”
Are you sure you want to continue connecting when I click yes it starts working but I don’t know why its like that and secondly i am using windows when I compile this project in Linux it works fine there

Hey,

This question should probably be asked on the grgit issues page, as it’s not related to Gradle, but to Grgit cloning issue.

Cheers,
François

But I am using gradle script and calling Grgit Clone Options and using package org.ajoberstar.grgit.Grgit and dependencies { classpath ‘org.ajoberstar:gradle-git:1.3.2’ } and my gradle version is 2,10
Still I need to discuss this on Git forum ?.Actually I am new to use it your help could guide me better

Your stacktrace shows a problem using Grgit.clone() operation.

Your setting in Gradle is probably fine (pulling the Grgit plugin in your classpath dependency), but I guess you miss some mandatory settings needed by Grgit to be able to clone your repo.

It’s hard to tell more without more information (your gradle build file, and some context on the git repo you want to clone)

Yup I also think so Could you tell me How I can check Grgit mandatory settings ? I dont have any idea to check its settings

That’s why I was pointing you to the issue forum of Grgit. You’ll get a better answer there.

My bet is that you have to use one of the method in AuthConfig

I tried to follow this discussion given in below link because my issue is somehow quie similar to this one https://github.com/ajoberstar/grgit/issues/63
I tried to use
org.ajoberstar.grgit.auth.ssh.private=%USERPROFILE%.ssh\id_rsa in my gradle build but it does not work gives me error “org” everytime although i am using below dependencies and imports
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath ‘org.ajoberstar:gradle-git:1.3.2’
}
}

import org.ajoberstar.grgit.Grgit
import org.ajoberstar.grgit.auth.AuthConfig
import org.ajoberstar.grgit.Credentials

could you please guide me where I am wrong in syntax how I can specify my private key location ?

How exactly do you specify the system property
"org.ajoberstar.grgit.auth.ssh.private" in your gradle build?
When connecting to your repo outside if gradle, are you using ssh protocol
and key-based authentication?

I used the org.ajoberstar.grgit.auth.ssh.private=Private Key Path to use private key authentication but
it gives me the error that gradle script does not recognize this property.Although I am accessing org.ajoberstar.grgit.auth.AuthConfig.SSH_PRIVATE_KEY_OPTION but i’s only readable
But i don’t know how I can specify path of my private key or how can i use ssh protocol and key-base authentication.
Could you please guide me what I have to do to call use these properties in my code ?

How did you specify this property exactly? Write the code you wrote :blush:

You can specify JVM system properties with -D on the command line or with sth like System.properties[prop name]="prop value"