int128 / int128/gradle-ssh-plugin

Auth fail when ssh-agent = true

Open
#280 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Groovy
Stars
325
Forks
59
Avg merge
5h 29m
Merged PRs (30d)
6

Description

Environment info

gradle-ssh-plugin-2.7.0 (groovy-ssh-2.7.0, jsch-0.1.53, groovy-2.4.7, java-1.8.0_77)

Steps to reproduce
  1. Configure remotes with SSH agent.
  2. Write a deploy task with an arbitrary session.
  3. Run deploy task.
plugins {
    id 'org.hidetake.ssh' version '2.7.0'
}

remotes {
    does_work {
        host = 'host'
        user = 'alex_ordonez'
        agent = true
//      passphrase = 'dontpostmeonline'
        identity = file("${System.properties['user.home']}/.ssh/id_rsa")
    }
    does_not_work {
        host = 'host'
        user = 'alex_ordonez'
//      agent = true
        passphrase = 'dontpostmeonline'
        identity = file("${System.properties['user.home']}/.ssh/id_rsa")
    }
}

The output from Gradle is:

Session #2 failed: java.lang.RuntimeException: java.lang.RuntimeException: com.jcraft.jsch.JSchException: Auth fail
:deploy FAILED

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/alex/projects/project/build.gradle' line: 78 // Line with ssh.run in deploy task

* What went wrong:
Execution failed for task ':deploy'.
> 1 of 2 session (50%) failed

BUILD FAILED

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the build.gradle deploy task and the remotes configuration shown in the report, then reproduce the failure with agent = true and the SSH agent environment. Compare it with the working passphrase configuration; done means the deploy task authenticates successfully through the agent without an Auth fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
authentication, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.