Skip to content

Commit

Permalink
get ssh key from PRIVATE_SSH_KEY
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 24, 2024
1 parent 006cf87 commit 7b2b312
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/java/com/rultor/agents/Agents.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}

0 comments on commit 7b2b312

Please sign in to comment.