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

Gradle tag using git ssh transport asking for (kerberos) password #35

Open
gustafg opened this issue May 4, 2018 · 1 comment
Open

Comments

@gustafg
Copy link

gustafg commented May 4, 2018

Hi,
when trying to issue gradle tag my build hangs in an interactive prompt asking for my Kerberos password. When reading your code I understand it only supports git over ssh when url starts with 'git@'. There is no supported way to use Kerberos credentials or any kind of password authentication when accessing GitLab over SSH (since it depends on ~/ssh/authorized_keys) to my knowledge. Therefor a patch such as this should be fine:

--- a/src/main/groovy/com/intershop/gradle/scm/services/git/SshConnector.groovy
+++ b/src/main/groovy/com/intershop/gradle/scm/services/git/SshConnector.groovy
@@ -70,6 +70,7 @@ class SshConnector extends JschConfigSessionFactory {
     protected void configure(OpenSshConfig.Host hc, Session session) {
         session.setConfig("StrictHostKeyChecking", "no")
         session.setConfig("UserKnownHostsFile", "/dev/null")
+        session.setConfig("PreferredAuthentications", "publickey")
     }

Since I haven't done a very thourough code reading I thought I would just ask before sending a PR. If this patch looks good to you please apply it or ask for a PR or let me know what I need to do to enhance it for you to accept it.

@gustafg gustafg changed the title Git SSH asking for (kerberos) password Gradle tag using git ssh transport asking for (kerberos) password May 4, 2018
@m-raab
Copy link
Contributor

m-raab commented May 11, 2018

It is possible to use username and password instead of a public key. In this case the credentials must be stored in your private gradle.properties or environment. An input during the execution of the plugin is not a good idea, because the plugin must also run on a CI system.

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

No branches or pull requests

2 participants