diff --git a/src/main/java/com/rultor/agents/Agents.java b/src/main/java/com/rultor/agents/Agents.java index 86e6d88b38..44d78bc105 100644 --- a/src/main/java/com/rultor/agents/Agents.java +++ b/src/main/java/com/rultor/agents/Agents.java @@ -436,11 +436,15 @@ private static String commanders(final String entry) { * @return The key */ private static String priv() { - return new UncheckedText( - new TextOf( - new ResourceOf("com/rultor/agents/rultor.key") - ) - ).asString(); + String priv = System.getenv("PRIVATE_SSH_KEY"); + if (priv == null) { + priv = new UncheckedText( + new TextOf( + new ResourceOf("com/rultor/agents/rultor.key") + ) + ).asString(); + } + return priv; } }