Skip to content

Conversation

antonio-petricca
Copy link

@antonio-petricca antonio-petricca commented Apr 4, 2018

I have added a sample code to push to git by the Jenkins Blue Ocean auto generated SSH key.

I have added some tweaking to avoid SSH key verification errors, too.

@antonio-petricca antonio-petricca changed the title SSH private key authentication and Jenkins Blue Ocean. SSH private key authentication and Jenkins Blue Ocean Apr 4, 2018
// advantage of the auto generated SSH key...

sshagent (credentials: ['jenkins-generated-ssh-key']) {
sh 'git config core.sshCommand "ssh -v -o StrictHostKeyChecking=no"'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is StrictHostKeyChecking=no really something we want to recommend as a best practice?

Copy link
Author

@antonio-petricca antonio-petricca Apr 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the only way to make it working. I got it from the SSH Agent plugin official guide.

Thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants