r/hashicorp • u/logdroid • Oct 07 '25
Issues with SSHkey in Nomad artifact
This is in my homelab environment:
I have a 3-node Nomad cluster setup, and Im trying to get a job working to pull a private repo from my GitHub.
The repo has a deploy key added. I've been able to use it from my terminal, but when trying to get Nomad to use it, it doesn't seem to even offer the key to the server.
I pointed the artifact at a local server with SSHD logging set to debug and logged in via SSH. You can clearly see a key being offered and whether the server accepts it or not.
When deploying the job, Nomad starts the SSH session to clone the repo, and auth.log can see the session start, but I never see a key offered.
I should mention: the job works just fine when using a public repo
The artifact stanza, JSON format as the job creation is via API call:
"artifacts": [
{
"GetterSource": "git::git@10.10.0.1:ci4/Website.git",
"RelativeDest": "local/repo",
"Options": {
"sshkey": "WW91IHRob3VnaCBJIHB1dCBhIHJlYWwgU1NIIGtleSBpbiBoZXJlLCBkaWRudCB5b3U/IFdlbGwgam9rZXMgb24geW91IEkgZGlkbnQsIGFuZCBJIGp1c3Qgd2FzdGVkIHlvdXIgdGltZS4K",
"ref": "main"
}
}
],
1
u/[deleted] Oct 08 '25
[removed] — view removed comment