Skip to content

SSH private key authentication and Jenkins Blue Ocean #88

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants