The key format is invalid. Please check your private key.

Andrej Kvasnica July 2, 2019

1. generating the key:

ssh-keygen -t rsa -o -C "git-jira-robot@machine" -f git-jira-robot
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in git-jira-robot.
Your public key has been saved in git-jira-robot.pub.

2. testing the ssh to gitlab server:

ssh -i ./git-jira-robot git@git-server
PTY allocation request failed on channel 0
Welcome to GitLab, @gitjirarobot!
Connection to git-server closed.

ssh key works nice for direct ssh.

3. uploading to jira running latest Git Integration for Jira v. 3.2.7:
https://jira/secure/AddSshKey.jspa

and the message is:
The key format is invalid. Please check your private key.

 

 

1 answer

1 accepted

1 vote
Answer accepted
Adam Wride
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.
July 2, 2019

Hi @Andrej Kvasnica -

I'm with BigBrassBand - the vendor supporting the Git Integration for Jira app.

The key format is invalid can represent a variety of issues. We detail some solutions here: https://bigbrassband.atlassian.net/wiki/spaces/GITSERVER/pages/140574747/SSH+key+file+format+is+invalid

Please reach out to us at support@bigbrassband.com if you have further questions.

Cheers,

Adam

Andrej Kvasnica July 2, 2019

this

ssh-keygen -t rsa -b 4096 -m pem -C "git-jira-robot@machine" -f git-jira-robot

worked nice for me. It seems that the -m pem parameter is essential.

Like Adam Wride likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events