GitClone fails to pop the awt password box from 0.6.0 up #31
Comments
Whoops, didn't realize issues would link cross-project :-) |
Unfortunately, I don't have the best understanding of how JGit's authentication works. I'm thinking the issue might be that the plugin is detecting either ssh-agent or Pageant on your devices and trying to use them, even though you don't have the correct SSH key available. I'll try a few tests to see if I can recreate the issue. The best solution might be to add a configuration option to hardcode your desired auth method. |
I was trying to trigger some alternative authentication option via Gradle, yeah, but was unsure how to. Just including a credentials.password block seemed to get ignored, and I've tried adding those to a gradle.properties in the user home dir before. I'll circle back around and try some more when I get a chance :-) |
The credentials block only works when using something like basic auth. It isn't set up to handle SSH keys. What operating system are you using? Part of the issue seems to be that anytime you are on Windows, it thinks Pageant is available. I'm working on a way to make sure it actually has a key before letting it use the Pageant connector. I'll also look into options for letting you force it not to use the agent. |
I think I've fixed the agent selection, so it should work without needing an option to force it. Can you give this new snapshot a try? buildscript {
repositories {
maven { url 'https://oss.sonatype.org/content/groups/public/' }
}
dependencies {
classpath 'org.ajoberstar:gradle-git:0.6.3-SNAPSHOT'
}
} |
That did it! Works perfectly now :-) And yep, I'm on Windows. Thank you very much! |
Good to hear! I'll push out the 0.6.3 release now. Should hit Maven Central in a few hours. |
✨ |
After lengthy troubleshooting of my issues noted in #30 thinking I had messed up my local dependency cache / SSH setup I finally tried to vary the gradle-git version and my issue went away when using 0.5.0 again :-)
I tossed together a quick example:
That fails for me on my primary system, a clean system (just in case I had messed something up), and on a friend's system with the following error (with --stacktrace on):
Normal command line git commands work fine and ask for my passphrase. Going back to 0.5.0 makes it work fine and the awt passphrase prompt pops up.
While digging around I found: http://stackoverflow.com/questions/12502452/how-do-you-set-the-configuration-for-jschconfigsessionfactory-for-jgit-so-that-p/15290861#15290861
But I'm not sure if I'm simply approaching authentication the wrong way after the addition of jsch-agent-proxy support in 0.6.0. Same error in 0.6.2, although at least the new GitInit task works - unsurprisingly since it doesn't auth :-)
I've tried adding the following to no avail:
Thoughts?
The text was updated successfully, but these errors were encountered: