Hey all, I’m trying to pull from a private repo with the artifact block in my job description:
artifact {
source = "git@github.com:my/private/git/file.txt"
destination = "local/repo"
options {
sshkey = "somelongstringofcharactersoutputedbybase64command=(base)"
}
}
I understand that the key must be converted to base64, which I had done (with base64 -w0 ), which resulted in an output of a long string similar to above, ending in ‘=(base)’. I have tried including and removing the ‘=(base)’ portion of the string but I haven’t had any luck with either. What simple thing am I missing?
Maybe I should add that the key I’m using is from the id_rsa.pub file found on my machine converted with the previously mentioned command. Do I need some other specific type of key? I don’t know much about keys.
EDIT: I figured it out. It was due to missing the “=” sign at the end of the key. So the key, when using the command, should look something like:
“aslkjdoqjqoinjfoqnaljoi=(base)”
you want to feed in everything up to and including the equals sign:
“aslkjdoqjqoinjfoqnaljoi=”
ALSO, I had to use the private key, not the public key. This is the id_rsa file and not the id_rsa.pub file.
Silly mistake, I’ll leave this up in case another noobie gets stuck.
EDIT 2: It looks like the mysterious (base) that was being appended to the end of the key came from the terminal not moving to the next line, and the (base) was actually from Anaconda’s ‘base’ environment that was being loaded. Probably just a me problem, but others with Anaconda installed might have the same issue.