Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

GIT Connection Private Key Expected File Format for "Upload private key for ssh" Option

mstachura1
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 16, 2020

I'm trying to connect Crucible to an AWS CodeCommit repository. There's a related post that has been very helpful (https://community.atlassian.com/t5/Fisheye-Crucible-questions/Can-AWS-CodeCommit-support-integration-with-Atlassian-Crucible/qaq-p/54807?tempId=eyJvaWRjX2NvbnNlbnRfbGFuZ3VhZ2VfdmVyc2lvbiI6IjEuMCIsIm9pZGNfY29uc2VudF9ncmFudGVkX2F0IjoxNTc2ODYyMTMxMTczfQ%3D%3D#U1348164) that suggests creating an AWS IAM user with read access to CodeCommit and within Crucible connecting to the repository using the "Upload private key for ssh" option with that user's credentials. I've followed all the instructions in that post, but am running into an error when I upload the private key file ("The file you uploaded is not a valid private key"). I tried uploading a CSV and TXT file containing just the key, and also a CSV file containing the user name, key ID, key, and console login link, but nothing has worked so far. What format is the private key file supposed to be in? Thanks you for your help!

1 answer

0 votes
Peter-Dave Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 24, 2020

The key you want to upload can have any extension, but it is essentially a plain text file that will have some content that looks like this:

-----BEGIN RSA PRIVATE KEY-----
MIIEpgIBAAKCAQEA+G+sK03a0pJgFP85+AZPxhFCbCBEvHjrJRC32ofbaHDvn6QO
HvYwiY/Sy4M1SY9WcAyPhgXh8PsihYn5mTzyO+cO9O6AzeLH0ZCCv7pWbdhmkTqX
l+1bagT0vDIqQmO9hTPs3GZg81lpXF9RSPhuYuuecq4OsHiusm9tJo4bjn66ZXD1
krFkF2JepYzzW1sJ+w4u2+5fpOoJPv9j+2t3wCyWOm6xngrMMzjEJtmv1DdSFhzu
1VRvFH9c9lYBAveWfj5lchzXT8f3IsfbUbyXLNSb0+eJdxZ2tVCtja8b5VQUsNio
5cvDf5dNSMwvKV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xOmq5DtYpu1MDLEpfnFda7FOnpC
TkS5UF8BAoGBALwHyfV9Jiv1j6WSAboSjllBxf+zhsbN76F93qDEezpJydF9+/IY
+XMDS8eJ1UEu7I0MAjRM7pSfsqqC4rAu4K3ZjjSUWqL0LMPfMzcAYwR+UcZrrT+A
6LaM6eF9NUynXS8MMGMsfoEOfTC3w41yE2e9H9oe7EUDin2mg8xx1Ii2
-----END RSA PRIVATE KEY-----

I generated this from linux command line with the comand ssh-keygen
Be sure to leave the passphrase blank and specify a file name (don't let it go into .ssh/rsa_id or whatever it suggests). 

You can do the same with putty key generator, but don't use the "save private key" button. Instead, select conversions in the menu then export OpenSSH Key

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events